Permalink
Browse files

fix #82

  • Loading branch information...
1 parent b9d29ac commit 11fddd374dc765c0230348e12d80b9637af2c476 @krakjoe committed Mar 22, 2013
Showing with 7 additions and 3 deletions.
  1. +1 −1 src/handlers.c
  2. +6 −2 src/store.c
View
2 src/handlers.c
@@ -264,7 +264,7 @@ void pthreads_unset_property(PTHREADS_UNSET_PROPERTY_PASSTHRU_D) {
if (mstring != NULL) {
zval_ptr_dtor(&mstring);
}
-}
+}
void pthreads_unset_dimension(PTHREADS_UNSET_DIMENSION_PASSTHRU_D) { pthreads_unset_property(PTHREADS_UNSET_DIMENSION_PASSTHRU_C); }
/* }}} */
View
8 src/store.c
@@ -335,14 +335,18 @@ static pthreads_storage pthreads_store_create(zval *unstore, zend_bool complex T
case IS_ARRAY: {
if (pthreads_store_tostring(unstore, (char**) &storage->data, &storage->length, complex TSRMLS_CC)==SUCCESS) {
if (storage->type==IS_ARRAY) {
- storage->exists = zend_hash_num_elements(Z_ARRVAL_P(unstore));
+ storage->exists = zend_hash_num_elements(
+ Z_ARRVAL_P(unstore));
} else {
storage->exists = 1;
+ Z_OBJ_HT_P(unstore)->add_ref(
+ unstore TSRMLS_CC);
}
}
} break;
- default: storage->exists = 0;
+ default:
+ storage->exists = 0;
}
}
}

0 comments on commit 11fddd3

Please sign in to comment.