X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_requestdatashare_object.c;h=46299e6b965a1bdb12728ffe113b4d56cb7b5521;hp=e3872f632f36c0db4cbc77445c63b16339d60665;hb=76d11ef7477a1caf622ac9823da6b2b098c9b86c;hpb=0eccfc06147e6b5559f871cd1a1332abf6a9b526 diff --git a/http_requestdatashare_object.c b/http_requestdatashare_object.c index e3872f6..46299e6 100644 --- a/http_requestdatashare_object.c +++ b/http_requestdatashare_object.c @@ -157,7 +157,7 @@ static void _http_requestdatashare_object_write_prop(zval *object, zval *member, getObjectEx(http_requestdatashare_object, obj, object); SEPARATE_ZVAL_IF_NOT_REF(&value); - status = http_request_datashare_set(obj->share, Z_STRVAL_P(member), Z_STRLEN_P(member), zval_is_true(value)); + status = http_request_datashare_set(obj->share, Z_STRVAL_P(member), Z_STRLEN_P(member), (zend_bool) zval_is_true(value)); if (orig != value) { zval_ptr_dtor(&value); value = orig; @@ -193,7 +193,7 @@ PHP_METHOD(HttpRequestDataShare, count) NO_ARGS; - RETURN_LONG(zend_llist_count(&obj->share->handles)); + RETURN_LONG(zend_llist_count(HTTP_RSHARE_HANDLES(obj->share))); } /* }}} */ @@ -272,7 +272,7 @@ static inline zval *_http_requestdatashare_instantiate(zval *this_ptr, zend_bool if (!this_ptr) { MAKE_STD_ZVAL(this_ptr); Z_TYPE_P(this_ptr) = IS_OBJECT; - this_ptr->value.obj = http_requestdatashare_object_new(http_requestdatashare_object_ce); + this_ptr->value.obj = http_requestdatashare_object_new_ex(http_requestdatashare_object_ce, global ? http_request_datashare_global_get() : NULL, NULL); } if (global) { if (HTTP_G->request.datashare.cookie) {