-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
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).