Skip to content
Browse files

Revert Mark Parlane's spare index patch as it was not needed at all.

  • Loading branch information...
1 parent f725a00 commit d3c0fe31c27b5ac898006c111c494fb0efa7991c @derickr derickr committed Jan 5, 2012
Showing with 3 additions and 9 deletions.
  1. +2 −5 collection.c
  2. +1 −4 php_mongo.h
View
7 collection.c
@@ -183,7 +183,7 @@ static zval* append_getlasterror(zval *coll, buffer *buf, zval *options TSRMLS_D
mongo_cursor *cursor;
mongo_collection *c = (mongo_collection*)zend_object_store_get_object(coll TSRMLS_CC);
mongo_db *db = (mongo_db*)zend_object_store_get_object(c->parent TSRMLS_CC);
- int response, safe = 0, fsync = 0, timeout = -1, sparse = 0;
+ int response, safe = 0, fsync = 0, timeout = -1;
GET_OPTIONS;
@@ -218,9 +218,6 @@ static zval* append_getlasterror(zval *coll, buffer *buf, zval *options TSRMLS_D
if (fsync) {
add_assoc_bool(cmd, "fsync", 1);
}
- if (sparse) {
- add_assoc_bool(cmd, "sparse", 1);
- }
// get cursor
MAKE_STD_ZVAL(cursor_z);
@@ -673,7 +670,7 @@ PHP_METHOD(MongoCollection, ensureIndex) {
}
// new style
else {
- zval temp, **safe_pp, **fsync_pp, **timeout_pp, **sparse_pp, **name;
+ zval temp, **safe_pp, **fsync_pp, **timeout_pp, **name;
zend_hash_merge(HASH_P(data), HASH_P(options), (void (*)(void*))zval_add_ref, &temp, sizeof(zval*), 1);
if (zend_hash_find(HASH_P(options), "safe", strlen("safe")+1, (void**)&safe_pp) == SUCCESS) {
View
5 php_mongo.h
@@ -367,7 +367,7 @@ typedef struct {
timeout = Z_LVAL_P(timeout_p); \
\
if (options && !IS_SCALAR_P(options)) { \
- zval **safe_pp, **fsync_pp, **timeout_pp, **sparse_pp; \
+ zval **safe_pp, **fsync_pp, **timeout_pp; \
\
if (SUCCESS == zend_hash_find(HASH_P(options), "safe", strlen("safe")+1, (void**)&safe_pp)) { \
if (Z_TYPE_PP(safe_pp) == IS_STRING) { \
@@ -386,9 +386,6 @@ typedef struct {
if (SUCCESS == zend_hash_find(HASH_P(options), "timeout", strlen("timeout")+1, (void**)&timeout_pp)) {\
timeout = Z_LVAL_PP(timeout_pp); \
} \
- if (SUCCESS == zend_hash_find(HASH_P(options), "sparse", strlen("sparse")+1, (void**)&sparse_pp)) {\
- sparse = Z_BVAL_PP(sparse_pp); \
- } \
}

0 comments on commit d3c0fe3

Please sign in to comment.
Something went wrong with that request. Please try again.