Skip to content

Commit 094441f

Browse files
committed
ported ext/soap
1 parent 2da1c80 commit 094441f

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
lines changed

ext/soap/php_encoding.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node TSRMLS_DC) {
290290
if (Z_TYPE_P(data) == IS_OBJECT) {
291291
data = (zval*)Z_OBJ_P(data);
292292
}
293-
if ((node_ptr = zend_hash_index_find_ptr(SOAP_GLOBAL(ref_map), (ulong)data)) != NULL) {
293+
if ((node_ptr = zend_hash_index_find_ptr(SOAP_GLOBAL(ref_map), (php_uint_t)data)) != NULL) {
294294
xmlAttrPtr attr = node_ptr->properties;
295295
char *id;
296296
smart_str prefix = {0};
@@ -344,7 +344,7 @@ static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node TSRMLS_DC) {
344344
smart_str_free(&prefix);
345345
return 1;
346346
} else {
347-
zend_hash_index_update_ptr(SOAP_GLOBAL(ref_map), (ulong)data, node);
347+
zend_hash_index_update_ptr(SOAP_GLOBAL(ref_map), (php_uint_t)data, node);
348348
}
349349
}
350350
return 0;
@@ -355,7 +355,7 @@ static zend_bool soap_check_xml_ref(zval *data, xmlNodePtr node TSRMLS_DC)
355355
zval *data_ptr;
356356

357357
if (SOAP_GLOBAL(ref_map)) {
358-
if ((data_ptr = zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)node)) != NULL) {
358+
if ((data_ptr = zend_hash_index_find(SOAP_GLOBAL(ref_map), (php_uint_t)node)) != NULL) {
359359
if (!Z_REFCOUNTED_P(data) ||
360360
!Z_REFCOUNTED_P(data_ptr) ||
361361
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)
371371
static void soap_add_xml_ref(zval *data, xmlNodePtr node TSRMLS_DC)
372372
{
373373
if (SOAP_GLOBAL(ref_map)) {
374-
zend_hash_index_update(SOAP_GLOBAL(ref_map), (ulong)node, data);
374+
zend_hash_index_update(SOAP_GLOBAL(ref_map), (php_uint_t)node, data);
375375
}
376376
}
377377

@@ -986,7 +986,7 @@ static zval *to_zval_double(zval *ret, encodeTypePtr type, xmlNodePtr data TSRML
986986

987987
if (data && data->children) {
988988
if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
989-
long lval;
989+
php_int_t lval;
990990
double dval;
991991

992992
whiteSpace_collapse(data->children->content);
@@ -1024,7 +1024,7 @@ static zval *to_zval_long(zval *ret, encodeTypePtr type, xmlNodePtr data TSRMLS_
10241024

10251025
if (data && data->children) {
10261026
if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
1027-
long lval;
1027+
php_int_t lval;
10281028
double dval;
10291029

10301030
whiteSpace_collapse(data->children->content);
@@ -2689,7 +2689,7 @@ static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodeP
26892689
{
26902690
zval *temp_data;
26912691
zend_string *key_val;
2692-
ulong int_val;
2692+
php_uint_t int_val;
26932693
xmlNodePtr xmlParam;
26942694
xmlNodePtr xparam, item;
26952695
xmlNodePtr key;
@@ -3498,7 +3498,7 @@ encodePtr get_conversion(int encode)
34983498

34993499
static int is_map(zval *array)
35003500
{
3501-
ulong index;
3501+
php_uint_t index;
35023502
zend_string *key;
35033503
int i = 0;
35043504

ext/soap/php_http.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, ph
161161
char *host;
162162
char *name;
163163
char *protocol;
164-
long namelen;
164+
php_int_t namelen;
165165
int port;
166166
int old_error_reporting;
167167
struct timeval tv;
@@ -347,7 +347,7 @@ int make_http_soap_request(zval *this_ptr,
347347
int http_1_1;
348348
int http_status;
349349
int content_type_xml = 0;
350-
long redirect_max = 20;
350+
php_int_t redirect_max = 20;
351351
char *content_encoding;
352352
char *http_msg = NULL;
353353
zend_bool old_allow_url_fopen;

ext/soap/php_schema.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashT
21692169

21702170
zend_hash_move_forward(tmp->attributes);
21712171
} else {
2172-
ulong index;
2172+
php_uint_t index;
21732173

21742174
schema_attributegroup_fixup(ctx, tmp_attr, ht);
21752175
zend_hash_get_current_key(tmp->attributes, NULL, &index, 0);
@@ -2268,7 +2268,7 @@ static void schema_type_fixup(sdlCtx *ctx, sdlTypePtr type)
22682268
}
22692269
if (type->attributes) {
22702270
zend_string *str_key;
2271-
ulong index;
2271+
php_uint_t index;
22722272

22732273
ZEND_HASH_FOREACH_KEY_PTR(type->attributes, index, str_key, attr) {
22742274
if (str_key) {

ext/soap/php_sdl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3151,7 +3151,7 @@ static void delete_psdl(zval *zv)
31513151
free(Z_PTR_P(zv));
31523152
}
31533153

3154-
sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC)
3154+
sdlPtr get_sdl(zval *this_ptr, char *uri, php_int_t cache_wsdl TSRMLS_DC)
31553155
{
31563156
char fn[MAXPATHLEN];
31573157
sdlPtr sdl = NULL;

ext/soap/php_sdl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ struct _sdlAttribute {
254254
};
255255

256256

257-
sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC);
257+
sdlPtr get_sdl(zval *this_ptr, char *uri, php_int_t cache_wsdl TSRMLS_DC);
258258

259259
encodePtr get_encoder_from_prefix(sdlPtr sdl, xmlNodePtr data, const xmlChar *type);
260260
encodePtr get_encoder(sdlPtr sdl, const char *ns, const char *type);

ext/soap/php_soap.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ ZEND_BEGIN_MODULE_GLOBALS(soap)
171171
char cache_mode;
172172
char cache_enabled;
173173
char* cache_dir;
174-
long cache_ttl;
175-
long cache_limit;
174+
php_int_t cache_ttl;
175+
php_int_t cache_limit;
176176
HashTable *mem_cache;
177177
xmlCharEncodingHandlerPtr encoding;
178178
HashTable *class_map;

ext/soap/soap.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ PHP_METHOD(SoapServer, SoapServer)
11211121
zval *wsdl = NULL, *options = NULL;
11221122
zend_resource *res;
11231123
int version = SOAP_1_1;
1124-
long cache_wsdl;
1124+
php_int_t cache_wsdl;
11251125
HashTable *typemap_ht = NULL;
11261126

11271127
SOAP_SERVER_BEGIN_CODE();
@@ -1248,19 +1248,19 @@ PHP_METHOD(SoapServer, SoapServer)
12481248
PHP_METHOD(SoapServer, setPersistence)
12491249
{
12501250
soapServicePtr service;
1251-
long value;
1251+
php_int_t value;
12521252

12531253
SOAP_SERVER_BEGIN_CODE();
12541254

12551255
FETCH_THIS_SERVICE(service);
12561256

1257-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &value) != FAILURE) {
1257+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &value) != FAILURE) {
12581258
if (service->type == SOAP_CLASS) {
12591259
if (value == SOAP_PERSISTENCE_SESSION ||
12601260
value == SOAP_PERSISTENCE_REQUEST) {
12611261
service->soap_class.persistance = value;
12621262
} else {
1263-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to set persistence with bogus value (%ld)", value);
1263+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to set persistence with bogus value (%pd)", value);
12641264
return;
12651265
}
12661266
} else {
@@ -2330,7 +2330,7 @@ PHP_METHOD(SoapClient, SoapClient)
23302330
zval *wsdl, *options = NULL;
23312331
int soap_version = SOAP_1_1;
23322332
php_stream_context *context = NULL;
2333-
long cache_wsdl;
2333+
php_int_t cache_wsdl;
23342334
sdlPtr sdl = NULL;
23352335
HashTable *typemap_ht = NULL;
23362336
zval *this_ptr = getThis();
@@ -3082,11 +3082,11 @@ PHP_METHOD(SoapClient, __doRequest)
30823082
{
30833083
char *buf, *location, *action;
30843084
int buf_size, location_size, action_size;
3085-
long version;
3086-
long one_way = 0;
3085+
php_int_t version;
3086+
php_int_t one_way = 0;
30873087
zval *this_ptr = getThis();
30883088

3089-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssl|l",
3089+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssi|i",
30903090
&buf, &buf_size,
30913091
&location, &location_size,
30923092
&action, &action_size,
@@ -3801,7 +3801,7 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
38013801
int i = 0;
38023802
zend_string *param_name;
38033803
//???
3804-
ulong param_index = i;
3804+
php_uint_t param_index = i;
38053805

38063806
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(ret), param_index, param_name, data) {
38073807
parameter = get_param(function, param_name->val, param_index, TRUE);

0 commit comments

Comments
 (0)