]> granicus.if.org Git - php/commitdiff
ported ext/soap
authorAnatol Belski <ab@php.net>
Tue, 19 Aug 2014 11:49:48 +0000 (13:49 +0200)
committerAnatol Belski <ab@php.net>
Tue, 19 Aug 2014 11:49:48 +0000 (13:49 +0200)
ext/soap/php_encoding.c
ext/soap/php_http.c
ext/soap/php_schema.c
ext/soap/php_sdl.c
ext/soap/php_sdl.h
ext/soap/php_soap.h
ext/soap/soap.c

index 28ffc618b9bd72b9115e6971bf660b2bf02ab2c8..97b619d359a1ffea7f49931fea3ea20b5f26a166 100644 (file)
@@ -290,7 +290,7 @@ static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node TSRMLS_DC) {
                if (Z_TYPE_P(data) == IS_OBJECT) {
                        data = (zval*)Z_OBJ_P(data);
                }
-               if ((node_ptr = zend_hash_index_find_ptr(SOAP_GLOBAL(ref_map), (ulong)data)) != NULL) {
+               if ((node_ptr = zend_hash_index_find_ptr(SOAP_GLOBAL(ref_map), (php_uint_t)data)) != NULL) {
                        xmlAttrPtr attr = node_ptr->properties;
                        char *id;
                        smart_str prefix = {0};
@@ -344,7 +344,7 @@ static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node TSRMLS_DC) {
                        smart_str_free(&prefix);
                        return 1;
                } else {
-                       zend_hash_index_update_ptr(SOAP_GLOBAL(ref_map), (ulong)data, node);
+                       zend_hash_index_update_ptr(SOAP_GLOBAL(ref_map), (php_uint_t)data, node);
                }
        }
        return 0;
@@ -355,7 +355,7 @@ static zend_bool soap_check_xml_ref(zval *data, xmlNodePtr node TSRMLS_DC)
        zval *data_ptr;
 
        if (SOAP_GLOBAL(ref_map)) {
-               if ((data_ptr = zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)node)) != NULL) {
+               if ((data_ptr = zend_hash_index_find(SOAP_GLOBAL(ref_map), (php_uint_t)node)) != NULL) {
                        if (!Z_REFCOUNTED_P(data) ||
                            !Z_REFCOUNTED_P(data_ptr) ||
                            Z_COUNTED_P(data) != Z_COUNTED_P(data_ptr)) {
@@ -371,7 +371,7 @@ static zend_bool soap_check_xml_ref(zval *data, xmlNodePtr node TSRMLS_DC)
 static void soap_add_xml_ref(zval *data, xmlNodePtr node TSRMLS_DC)
 {
        if (SOAP_GLOBAL(ref_map)) {
-               zend_hash_index_update(SOAP_GLOBAL(ref_map), (ulong)node, data);
+               zend_hash_index_update(SOAP_GLOBAL(ref_map), (php_uint_t)node, data);
        }
 }
 
@@ -986,7 +986,7 @@ static zval *to_zval_double(zval *ret, encodeTypePtr type, xmlNodePtr data TSRML
 
        if (data && data->children) {
                if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
-                       long lval;
+                       php_int_t lval;
                        double dval;
 
                        whiteSpace_collapse(data->children->content);
@@ -1024,7 +1024,7 @@ static zval *to_zval_long(zval *ret, encodeTypePtr type, xmlNodePtr data TSRMLS_
 
        if (data && data->children) {
                if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
-                       long lval;
+                       php_int_t lval;
                        double dval;
 
                        whiteSpace_collapse(data->children->content);
@@ -2689,7 +2689,7 @@ static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodeP
 {
        zval *temp_data;
        zend_string *key_val;
-       ulong int_val;
+       php_uint_t int_val;
        xmlNodePtr xmlParam;
        xmlNodePtr xparam, item;
        xmlNodePtr key;
@@ -3498,7 +3498,7 @@ encodePtr get_conversion(int encode)
 
 static int is_map(zval *array)
 {
-       ulong index;
+       php_uint_t index;
        zend_string *key;
        int i = 0;
 
index 4ad824ae413ee73c2eba015e92c32ea8166360c1..0935ce36adbf2587eecbcb80556671296e7a0196 100644 (file)
@@ -161,7 +161,7 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, ph
        char *host;
        char *name;
        char *protocol;
-       long namelen;
+       php_int_t namelen;
        int port;
        int old_error_reporting;
        struct timeval tv;
@@ -347,7 +347,7 @@ int make_http_soap_request(zval  *this_ptr,
        int http_1_1;
        int http_status;
        int content_type_xml = 0;
-       long redirect_max = 20;
+       php_int_t redirect_max = 20;
        char *content_encoding;
        char *http_msg = NULL;
        zend_bool old_allow_url_fopen;
index b1fb8935b40c3def8c0401970e5783a85d7bda39..9145390ca390d6c9d86781073957664fac2105e3 100644 (file)
@@ -2169,7 +2169,7 @@ static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashT
 
                                                        zend_hash_move_forward(tmp->attributes);
                                                } else {
-                                                       ulong index;
+                                                       php_uint_t index;
 
                                                        schema_attributegroup_fixup(ctx, tmp_attr, ht);
                                                        zend_hash_get_current_key(tmp->attributes, NULL, &index, 0);
@@ -2268,7 +2268,7 @@ static void schema_type_fixup(sdlCtx *ctx, sdlTypePtr type)
        }
        if (type->attributes) {
                zend_string *str_key;
-               ulong index;
+               php_uint_t index;
 
                ZEND_HASH_FOREACH_KEY_PTR(type->attributes, index, str_key, attr) {
                        if (str_key) {
index e9c681a74fe54ff72265ac70d90513f65a1e2257..6daa8dbafec49540df45a9ee09db0607c1a996f8 100644 (file)
@@ -3151,7 +3151,7 @@ static void delete_psdl(zval *zv)
        free(Z_PTR_P(zv));
 }
 
-sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC)
+sdlPtr get_sdl(zval *this_ptr, char *uri, php_int_t cache_wsdl TSRMLS_DC)
 {
        char  fn[MAXPATHLEN];
        sdlPtr sdl = NULL;
index 2856ed1c4777b5e8fc32fa0c9bc3b06a5b133ff1..56877b5b85cc2f9980a0d9cbd1cceda7b4d6af32 100644 (file)
@@ -254,7 +254,7 @@ struct _sdlAttribute {
 };
 
 
-sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC);
+sdlPtr get_sdl(zval *this_ptr, char *uri, php_int_t cache_wsdl TSRMLS_DC);
 
 encodePtr get_encoder_from_prefix(sdlPtr sdl, xmlNodePtr data, const xmlChar *type);
 encodePtr get_encoder(sdlPtr sdl, const char *ns, const char *type);
index d721af6234a3af0372bd5619cc04f8805a994610..d311214a2090158e5f0b147e686806677ee7a361 100644 (file)
@@ -171,8 +171,8 @@ ZEND_BEGIN_MODULE_GLOBALS(soap)
        char       cache_mode;
        char       cache_enabled;
        char*      cache_dir;
-       long       cache_ttl;
-       long       cache_limit;
+       php_int_t       cache_ttl;
+       php_int_t       cache_limit;
        HashTable *mem_cache;
        xmlCharEncodingHandlerPtr encoding;
        HashTable *class_map;
index 7a2eea242c8ee80727bf2203baa2e0b1c06441a9..5af02c3ad43733360956bcff09629b797451574a 100644 (file)
@@ -1121,7 +1121,7 @@ PHP_METHOD(SoapServer, SoapServer)
        zval *wsdl = NULL, *options = NULL;
        zend_resource *res;
        int version = SOAP_1_1;
-       long cache_wsdl;
+       php_int_t cache_wsdl;
        HashTable *typemap_ht = NULL;
 
        SOAP_SERVER_BEGIN_CODE();
@@ -1248,19 +1248,19 @@ PHP_METHOD(SoapServer, SoapServer)
 PHP_METHOD(SoapServer, setPersistence)
 {
        soapServicePtr service;
-       long value;
+       php_int_t value;
 
        SOAP_SERVER_BEGIN_CODE();
 
        FETCH_THIS_SERVICE(service);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &value) != FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &value) != FAILURE) {
                if (service->type == SOAP_CLASS) {
                        if (value == SOAP_PERSISTENCE_SESSION ||
                                value == SOAP_PERSISTENCE_REQUEST) {
                                service->soap_class.persistance = value;
                        } else {
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to set persistence with bogus value (%ld)", value);
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to set persistence with bogus value (%pd)", value);
                                return;
                        }
                } else {
@@ -2330,7 +2330,7 @@ PHP_METHOD(SoapClient, SoapClient)
        zval *wsdl, *options = NULL;
        int  soap_version = SOAP_1_1;
        php_stream_context *context = NULL;
-       long cache_wsdl;
+       php_int_t cache_wsdl;
        sdlPtr sdl = NULL;
        HashTable *typemap_ht = NULL;
        zval *this_ptr = getThis();
@@ -3082,11 +3082,11 @@ PHP_METHOD(SoapClient, __doRequest)
 {
   char *buf, *location, *action;
   int   buf_size, location_size, action_size;
-  long  version;
-  long  one_way = 0;
+  php_int_t  version;
+  php_int_t  one_way = 0;
   zval *this_ptr = getThis();
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssl|l",
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssi|i",
            &buf, &buf_size,
            &location, &location_size,
            &action, &action_size,
@@ -3801,7 +3801,7 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
                int i = 0;
                zend_string *param_name;
 //???
-               ulong param_index = i;
+               php_uint_t param_index = i;
 
                ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(ret), param_index, param_name, data) {
                        parameter = get_param(function, param_name->val, param_index, TRUE);