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

Refactor php_phongo_bson_state struct initialization for debug output

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Labels:

      Description

      We frequently do the following when converting BSON to a PHP value for debug info functions:

      php_phongo_bson_state state = PHONGO_BSON_STATE_INITIALIZER;
      /* Use native arrays for debugging output */
      state.map.root_type = PHONGO_TYPEMAP_NATIVE_ARRAY;
      state.map.document_type = PHONGO_TYPEMAP_NATIVE_ARRAY;
      

      Rather than duplicate this everywhere, we should refactor this with either a macro or simply a second initializer struct (e.g. PHONGO_DEBUG_BSON_STATE_INITIALIZER).

        Attachments

          Activity

            People

            Assignee:
            andreas.braun Andreas Braun
            Reporter:
            jmikola Jeremy Mikola
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: