Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2535

Copy bson_t by default for phongo_document_new and phongo_packedarray_new

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • PHP Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Existing usages of phongo_document_new and phongo_packedarray_new always copy the bson_t argument, so the parameter can likely be changed to const bson_t*. This would also allow removal of the copy boolean.

      If the non-copy functionality is needed down the line, "_ex" variants of these functions could be introduced.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None