diff options
author | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
commit | bdeb220f48825642f84cdbf3ff23a30613c92e86 (patch) | |
tree | 1a6cf34d20420e4815b4becb21311a4457d84103 /ext/soap/php_sdl.c | |
parent | bb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff) | |
download | php-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz |
first shot remove TSRMLS_* things
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r-- | ext/soap/php_sdl.c | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 798c06fdd2..f970958b4f 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -168,7 +168,6 @@ encodePtr get_encoder(sdlPtr sdl, const char *ns, const char *type) encodePtr get_encoder_ex(sdlPtr sdl, const char *nscat, int len) { encodePtr enc; - TSRMLS_FETCH(); if ((enc = zend_hash_str_find_ptr(&SOAP_GLOBAL(defEnc), (char*)nscat, len)) != NULL) { return enc; @@ -225,7 +224,7 @@ static int is_wsdl_element(xmlNodePtr node) return 1; } -void sdl_set_uri_credentials(sdlCtx *ctx, char *uri TSRMLS_DC) +void sdl_set_uri_credentials(sdlCtx *ctx, char *uri) { char *s; int l1, l2; @@ -277,8 +276,8 @@ void sdl_set_uri_credentials(sdlCtx *ctx, char *uri TSRMLS_DC) } if (l1 != l2 || memcmp(ctx->sdl->source, uri, l1) != 0) { /* another server. clear authentication credentals */ - php_libxml_switch_context(NULL, &context TSRMLS_CC); - php_libxml_switch_context(&context, NULL TSRMLS_CC); + php_libxml_switch_context(NULL, &context); + php_libxml_switch_context(&context, NULL); if (Z_TYPE(context) != IS_UNDEF) { zval *context_ptr = &context; ctx->context = php_stream_context_from_zval(context_ptr, 1); @@ -305,7 +304,7 @@ void sdl_set_uri_credentials(sdlCtx *ctx, char *uri TSRMLS_DC) } } -void sdl_restore_uri_credentials(sdlCtx *ctx TSRMLS_DC) +void sdl_restore_uri_credentials(sdlCtx *ctx) { if (Z_TYPE(ctx->old_header) != IS_UNDEF) { php_stream_context_set_option(ctx->context, "http", "header", &ctx->old_header); @@ -315,7 +314,7 @@ void sdl_restore_uri_credentials(sdlCtx *ctx TSRMLS_DC) ctx->context = NULL; } -static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include TSRMLS_DC) +static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include) { sdlPtr tmpsdl = ctx->sdl; xmlDocPtr wsdl; @@ -326,9 +325,9 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include return; } - sdl_set_uri_credentials(ctx, struri TSRMLS_CC); - wsdl = soap_xmlParseFile(struri TSRMLS_CC); - sdl_restore_uri_credentials(ctx TSRMLS_CC); + sdl_set_uri_credentials(ctx, struri); + wsdl = soap_xmlParseFile(struri); + sdl_restore_uri_credentials(ctx); if (!wsdl) { xmlErrorPtr xmlErrorPtr = xmlGetLastError(); @@ -348,7 +347,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include if (include) { xmlNodePtr schema = get_node_ex(root, "schema", XSD_NAMESPACE); if (schema) { - load_schema(ctx, schema TSRMLS_CC); + load_schema(ctx, schema); return; } } @@ -374,7 +373,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include while (trav2 != NULL) { if (node_is_equal_ex(trav2, "schema", XSD_NAMESPACE)) { - load_schema(ctx, trav2 TSRMLS_CC); + load_schema(ctx, trav2); } else if (is_wsdl_element(trav2) && !node_is_equal(trav2,"documentation")) { soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav2->name); } @@ -393,7 +392,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include uri = xmlBuildURI(tmp->children->content, base); xmlFree(base); } - load_wsdl_ex(this_ptr, (char*)uri, ctx, 1 TSRMLS_CC); + load_wsdl_ex(this_ptr, (char*)uri, ctx, 1); xmlFree(uri); } @@ -722,7 +721,7 @@ static HashTable* wsdl_message(sdlCtx *ctx, xmlChar* message_name) return parameters; } -static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) +static sdlPtr load_wsdl(zval *this_ptr, char *struri) { sdlCtx ctx; int i,n; @@ -739,7 +738,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) zend_hash_init(&ctx.portTypes, 0, NULL, NULL, 0); zend_hash_init(&ctx.services, 0, NULL, NULL, 0); - load_wsdl_ex(this_ptr, struri,&ctx, 0 TSRMLS_CC); + load_wsdl_ex(this_ptr, struri,&ctx, 0); schema_pass2(&ctx); n = zend_hash_num_elements(&ctx.services); @@ -1523,7 +1522,7 @@ static HashTable* sdl_deserialize_parameters(encodePtr *encoders, sdlTypePtr *ty return ht; } -static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time_t *cached TSRMLS_DC) +static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time_t *cached) { sdlPtr sdl; time_t old_t; @@ -2094,7 +2093,7 @@ static void sdl_serialize_soap_body(sdlSoapBindingFunctionBodyPtr body, HashTabl } } -static void add_sdl_to_cache(const char *fn, const char *uri, time_t t, sdlPtr sdl TSRMLS_DC) +static void add_sdl_to_cache(const char *fn, const char *uri, time_t t, sdlPtr sdl) { smart_str buf = {0}; smart_str *out = &buf; @@ -2917,7 +2916,7 @@ static sdlFunctionPtr make_persistent_sdl_function(sdlFunctionPtr func, HashTabl return pfunc; } -static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC) +static sdlPtr make_persistent_sdl(sdlPtr sdl) { sdlPtr psdl = NULL; HashTable ptr_map; @@ -3151,7 +3150,7 @@ static void delete_psdl(zval *zv) free(Z_PTR_P(zv)); } -sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) +sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl) { char fn[MAXPATHLEN]; sdlPtr sdl = NULL; @@ -3196,7 +3195,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) unsigned char digest[16]; int len = strlen(SOAP_GLOBAL(cache_dir)); time_t cached; - char *user = php_get_current_user(TSRMLS_C); + char *user = php_get_current_user(); int user_len = user ? strlen(user) + 1 : 0; md5str[0] = '\0'; @@ -3215,7 +3214,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) } memcpy(key+len,md5str,sizeof(md5str)); - if ((sdl = get_sdl_from_cache(key, uri, t-SOAP_GLOBAL(cache_ttl), &cached TSRMLS_CC)) != NULL) { + if ((sdl = get_sdl_from_cache(key, uri, t-SOAP_GLOBAL(cache_ttl), &cached)) != NULL) { t = cached; efree(key); goto cache_in_memory; @@ -3226,7 +3225,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) "_stream_context", sizeof("_stream_context")-1))) { context = php_stream_context_from_zval(tmp, 0); } else { - context = php_stream_context_alloc(TSRMLS_C); + context = php_stream_context_alloc(); } if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_user_agent", sizeof("_user_agent")-1)) != NULL && @@ -3253,7 +3252,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) ZVAL_NEW_STR(&str_proxy, proxy.s); if (!context) { - context = php_stream_context_alloc(TSRMLS_C); + context = php_stream_context_alloc(); } php_stream_context_set_option(context, "http", "proxy", &str_proxy); zval_ptr_dtor(&str_proxy); @@ -3264,10 +3263,10 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) php_stream_context_set_option(context, "http", "request_fulluri", &str_proxy); } - has_proxy_authorization = proxy_authentication(this_ptr, &headers TSRMLS_CC); + has_proxy_authorization = proxy_authentication(this_ptr, &headers); } - has_authorization = basic_authentication(this_ptr, &headers TSRMLS_CC); + has_authorization = basic_authentication(this_ptr, &headers); /* Use HTTP/1.1 with "Connection: close" by default */ if ((tmp = php_stream_context_get_option(context, "http", "protocol_version")) == NULL) { @@ -3282,9 +3281,9 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) zval str_headers; if (!context) { - context = php_stream_context_alloc(TSRMLS_C); + context = php_stream_context_alloc(); } else { - http_context_headers(context, has_authorization, has_proxy_authorization, 0, &headers TSRMLS_CC); + http_context_headers(context, has_authorization, has_proxy_authorization, 0, &headers); } smart_str_0(&headers); @@ -3295,12 +3294,12 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) if (context) { php_stream_context_to_zval(context, &new_context); - php_libxml_switch_context(&new_context, &orig_context TSRMLS_CC); + php_libxml_switch_context(&new_context, &orig_context); } SOAP_GLOBAL(error_code) = "WSDL"; - sdl = load_wsdl(this_ptr, uri TSRMLS_CC); + sdl = load_wsdl(this_ptr, uri); if (sdl) { sdl->is_persistent = 0; } @@ -3308,13 +3307,13 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl TSRMLS_DC) SOAP_GLOBAL(error_code) = old_error_code; if (context) { - php_libxml_switch_context(&orig_context, NULL TSRMLS_CC); + php_libxml_switch_context(&orig_context, NULL); zval_ptr_dtor(&new_context); } if ((cache_wsdl & WSDL_CACHE_DISK) && key) { if (sdl) { - add_sdl_to_cache(key, uri, t, sdl TSRMLS_CC); + add_sdl_to_cache(key, uri, t, sdl); } efree(key); } @@ -3348,7 +3347,7 @@ cache_in_memory: } } - psdl = make_persistent_sdl(sdl TSRMLS_CC); + psdl = make_persistent_sdl(sdl); psdl->is_persistent = 1; p.time = t; p.sdl = psdl; @@ -3360,7 +3359,7 @@ cache_in_memory: /* and replace it with persistent one */ sdl = psdl; } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to register persistent entry"); + php_error_docref(NULL, E_WARNING, "Failed to register persistent entry"); /* clean up persistent sdl */ delete_psdl_int(&p); /* keep non-persistent sdl and return it */ |