|
28 | 28 | #include "zend_interfaces.h"
|
29 | 29 | #include "ext/standard/php_incomplete_class.h"
|
30 | 30 |
|
31 |
| - |
32 |
| -static int le_typemap = 0; |
33 |
| - |
34 | 31 | typedef struct _soapHeader {
|
35 | 32 | sdlFunctionPtr function;
|
36 | 33 | zval function_name;
|
@@ -63,7 +60,6 @@ static xmlNodePtr serialize_parameter(sdlParamPtr param,zval *param_val,int inde
|
63 | 60 | static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName, int style, xmlNodePtr parent);
|
64 | 61 |
|
65 | 62 | static void delete_service(void *service);
|
66 |
| -static void delete_hashtable(void *hashtable); |
67 | 63 |
|
68 | 64 | static void soap_error_handler(int error_num, zend_string *error_filename, const uint32_t error_lineno, zend_string *message);
|
69 | 65 |
|
@@ -134,8 +130,6 @@ static void soap_error_handler(int error_num, zend_string *error_filename, const
|
134 | 130 | } \
|
135 | 131 | }
|
136 | 132 |
|
137 |
| -#define FETCH_TYPEMAP_RES(ss,tmp) ss = (HashTable*) zend_fetch_resource_ex(tmp, "typemap", le_typemap) |
138 |
| - |
139 | 133 | #define Z_PARAM_NAME_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 0))
|
140 | 134 | #define Z_PARAM_DATA_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 1))
|
141 | 135 |
|
@@ -454,11 +448,6 @@ PHP_RINIT_FUNCTION(soap)
|
454 | 448 | return SUCCESS;
|
455 | 449 | }
|
456 | 450 |
|
457 |
| -static void delete_hashtable_res(zend_resource *res) |
458 |
| -{ |
459 |
| - delete_hashtable(res->ptr); |
460 |
| -} |
461 |
| - |
462 | 451 | PHP_MINIT_FUNCTION(soap)
|
463 | 452 | {
|
464 | 453 | /* TODO: add ini entry for always use soap errors */
|
@@ -489,8 +478,6 @@ PHP_MINIT_FUNCTION(soap)
|
489 | 478 |
|
490 | 479 | soap_header_class_entry = register_class_SoapHeader();
|
491 | 480 |
|
492 |
| - le_typemap = zend_register_list_destructors_ex(delete_hashtable_res, NULL, "SOAP table", module_number); |
493 |
| - |
494 | 481 | soap_url_class_entry = register_class_Soap_Url();
|
495 | 482 | soap_url_class_entry->create_object = soap_url_object_create;
|
496 | 483 | soap_url_class_entry->default_object_handlers = &soap_url_object_handlers;
|
@@ -2148,8 +2135,7 @@ PHP_METHOD(SoapClient, __construct)
|
2148 | 2135 | if (typemap_ht) {
|
2149 | 2136 | HashTable *typemap = soap_create_typemap(sdl, typemap_ht);
|
2150 | 2137 | if (typemap) {
|
2151 |
| - zend_resource *res = zend_register_resource(typemap, le_typemap); |
2152 |
| - ZVAL_RES(Z_CLIENT_TYPEMAP_P(this_ptr), res); |
| 2138 | + ZVAL_ARR(Z_CLIENT_TYPEMAP_P(this_ptr), typemap); |
2153 | 2139 | }
|
2154 | 2140 | }
|
2155 | 2141 | SOAP_CLIENT_END_CODE();
|
@@ -2281,8 +2267,8 @@ static void do_soap_call(zend_execute_data *execute_data,
|
2281 | 2267 | }
|
2282 | 2268 |
|
2283 | 2269 | tmp = Z_CLIENT_TYPEMAP_P(this_ptr);
|
2284 |
| - if (Z_TYPE_P(tmp) == IS_RESOURCE) { |
2285 |
| - FETCH_TYPEMAP_RES(typemap, tmp); |
| 2270 | + if (Z_TYPE_P(tmp) == IS_ARRAY) { |
| 2271 | + typemap = Z_ARR_P(tmp); |
2286 | 2272 | }
|
2287 | 2273 |
|
2288 | 2274 | clear_soap_fault(this_ptr);
|
@@ -4478,10 +4464,4 @@ static void delete_service(void *data) /* {{{ */
|
4478 | 4464 | }
|
4479 | 4465 | /* }}} */
|
4480 | 4466 |
|
4481 |
| -static void delete_hashtable(void *data) /* {{{ */ |
4482 |
| -{ |
4483 |
| - HashTable *ht = (HashTable*)data; |
4484 |
| - zend_hash_destroy(ht); |
4485 |
| - efree(ht); |
4486 |
| -} |
4487 | 4467 | /* }}} */
|
0 commit comments