Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1173

Remove malloc for Decimal128 conversion during BSON->JSON

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • 1.4.0
    • None

    Description

      Since bson_decimal128_from_string () requires a null terminated string, the BSON to JSON conversion for bson_decimal128_t allocates a new string+1 since the input isn't null terminated.

      We should be able to avoid that extra malloc, either though stack allocation or passing the length to the bson_decimal128_from_string () function.

      Attachments

        Issue Links

          Activity

            People

              fiona.rowan@mongodb.com Fiona Rowan
              bjori Hannes Magnusson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: