write_concern = mongoc_write_concern_new(); if (IS_LONG == is_numeric_string(wstring, wstring_len, &w, NULL, 0)) { mongoc_write_concern_set_w(intern->write_concern, w); } else { if (strcmp(wstring, PHONGO_WRITE_CONCERN_W_MAJORITY) == 0) { mongoc_write_concern_set_w(intern->write_concern, MONGOC_WRITE_CONCERN_W_MAJORITY); } else { mongoc_write_concern_set_wtag(intern->write_concern, wstring); } } switch(ZEND_NUM_ARGS()) { case 4: if (fsync) { mongoc_write_concern_set_fsync(intern->write_concern, true); } // fallthrough case 3: if (journal) { mongoc_write_concern_set_journal(intern->write_concern, true); } // fallthrough case 2: if (wtimeout > 0) { mongoc_write_concern_set_wtimeout(intern->write_concern, wtimeout); } } */ /*** CIMPL ***/ } } $WriteConcern["forward_declarations"] = <<< EOT #define PHONGO_WRITE_CONCERN_W_MAJORITY "majority" EOT; $WriteConcern["free"] = <<< EOF if (intern->write_concern) { mongoc_write_concern_destroy(intern->write_concern); } EOF;