projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix some warnings
[m6w6/ext-http]
/
php_http_request_factory.c
diff --git
a/php_http_request_factory.c
b/php_http_request_factory.c
index be5cb7d938fa62f4a30f543df85dd1b68d9c75d5..f0e6680e6b19207c6ba76b1b1009aec037432213 100644
(file)
--- a/
php_http_request_factory.c
+++ b/
php_http_request_factory.c
@@
-50,13
+50,19
@@
PHP_HTTP_BEGIN_ARGS(__construct, 1)
PHP_HTTP_ARG_VAL(options, 0)
PHP_HTTP_END_ARGS;
PHP_HTTP_BEGIN_ARGS(createRequest, 0)
PHP_HTTP_ARG_VAL(options, 0)
PHP_HTTP_END_ARGS;
PHP_HTTP_BEGIN_ARGS(createRequest, 0)
- PHP_HTTP_ARG_VAL(persistentHandle, 0)
+ PHP_HTTP_ARG_VAL(url, 0)
+ PHP_HTTP_ARG_VAL(method, 0)
+ PHP_HTTP_ARG_VAL(options, 0)
PHP_HTTP_END_ARGS;
PHP_HTTP_BEGIN_ARGS(createPool, 0)
PHP_HTTP_END_ARGS;
PHP_HTTP_BEGIN_ARGS(createPool, 0)
- PHP_HTTP_ARG_VAL(persistentHandle, 0)
+ PHP_HTTP_ARG_OBJ(http\\Request, request1, 1)
+ PHP_HTTP_ARG_OBJ(http\\Request, request2, 1)
+ PHP_HTTP_ARG_OBJ(http\\Request, requestN, 1)
PHP_HTTP_END_ARGS;
PHP_HTTP_BEGIN_ARGS(createDataShare, 0)
PHP_HTTP_END_ARGS;
PHP_HTTP_BEGIN_ARGS(createDataShare, 0)
- PHP_HTTP_ARG_VAL(persistentHandle, 0)
+ PHP_HTTP_ARG_OBJ(http\\Request, request1, 1)
+ PHP_HTTP_ARG_OBJ(http\\Request, request2, 1)
+ PHP_HTTP_ARG_OBJ(http\\Request, requestN, 1)
PHP_HTTP_END_ARGS;
PHP_HTTP_EMPTY_ARGS(getGlobalDataShareInstance);
PHP_HTTP_EMPTY_ARGS(getDriver);
PHP_HTTP_END_ARGS;
PHP_HTTP_EMPTY_ARGS(getGlobalDataShareInstance);
PHP_HTTP_EMPTY_ARGS(getDriver);
@@
-89,7
+95,7
@@
PHP_METHOD(HttpRequestFactory, __construct)
FOREACH_HASH_KEYVAL(pos, options, key, val) {
if (key.type == HASH_KEY_IS_STRING) {
zval *newval = php_http_zsep(1, Z_TYPE_PP(val), *val);
FOREACH_HASH_KEYVAL(pos, options, key, val) {
if (key.type == HASH_KEY_IS_STRING) {
zval *newval = php_http_zsep(1, Z_TYPE_PP(val), *val);
- zend_update_property(php_http_request_factory_class_entry, getThis(), key.str, key.len - 1, newval);
+ zend_update_property(php_http_request_factory_class_entry, getThis(), key.str, key.len - 1, newval
TSRMLS_CC
);
zval_ptr_dtor(&newval);
}
}
zval_ptr_dtor(&newval);
}
}
@@
-140,7
+146,7
@@
PHP_METHOD(HttpRequestFactory, createRequest)
(php_http_resource_factory_handle_dtor_t) php_http_persistent_handle_release
};
(php_http_resource_factory_handle_dtor_t) php_http_persistent_handle_release
};
- rf = php_http_resource_factory_init(NULL, &ops, pf, (void (*)(void *)) php_http_persistent_handle_abandon
TSRMLS_CC
);
+ rf = php_http_resource_factory_init(NULL, &ops, pf, (void (*)(void *)) php_http_persistent_handle_abandon);
}
efree(name_str);
}
efree(name_str);
@@
-217,7
+223,7
@@
PHP_METHOD(HttpRequestFactory, createPool)
(php_http_resource_factory_handle_dtor_t) php_http_persistent_handle_release
};
(php_http_resource_factory_handle_dtor_t) php_http_persistent_handle_release
};
- rf = php_http_resource_factory_init(NULL, &ops, pf, (void (*)(void *)) php_http_persistent_handle_abandon
TSRMLS_CC
);
+ rf = php_http_resource_factory_init(NULL, &ops, pf, (void (*)(void *)) php_http_persistent_handle_abandon);
}
efree(name_str);
}
efree(name_str);
@@
-284,7
+290,7
@@
PHP_METHOD(HttpRequestFactory, createDataShare)
(php_http_resource_factory_handle_dtor_t) php_http_persistent_handle_release
};
(php_http_resource_factory_handle_dtor_t) php_http_persistent_handle_release
};
- rf = php_http_resource_factory_init(NULL, &ops, pf, (void (*)(void *)) php_http_persistent_handle_abandon
TSRMLS_CC
);
+ rf = php_http_resource_factory_init(NULL, &ops, pf, (void (*)(void *)) php_http_persistent_handle_abandon);
}
efree(name_str);
}
efree(name_str);
@@
-382,7
+388,7
@@
PHP_MINIT_FUNCTION(http_request_factory)
{
zend_hash_init(&php_http_request_factory_drivers, 0, NULL, NULL, 1);
{
zend_hash_init(&php_http_request_factory_drivers, 0, NULL, NULL, 1);
- PHP_HTTP_REGISTER_CLASS(http\\
r
equest, Factory, http_request_factory, php_http_object_class_entry, 0);
+ PHP_HTTP_REGISTER_CLASS(http\\
R
equest, Factory, http_request_factory, php_http_object_class_entry, 0);
php_http_request_factory_class_entry->create_object = php_http_request_factory_new;
zend_declare_property_stringl(php_http_request_factory_class_entry, ZEND_STRL("driver"), ZEND_STRL("curl"), ZEND_ACC_PROTECTED TSRMLS_CC);
php_http_request_factory_class_entry->create_object = php_http_request_factory_new;
zend_declare_property_stringl(php_http_request_factory_class_entry, ZEND_STRL("driver"), ZEND_STRL("curl"), ZEND_ACC_PROTECTED TSRMLS_CC);