@@ -283,16 +283,6 @@ static encodePtr find_encoder_by_type_name(sdlPtr sdl, const char *type)
283
283
return NULL ;
284
284
}
285
285
286
- static zval * soap_hash_str_find_deref (HashTable * ht , const char * str , size_t len ) {
287
- zval * zv = zend_hash_str_find (ht , str , len );
288
- if (!zv ) {
289
- return NULL ;
290
- }
291
-
292
- ZVAL_DEREF (zv );
293
- return zv ;
294
- }
295
-
296
286
static zend_bool soap_check_zval_ref (zval * data , xmlNodePtr node ) {
297
287
xmlNodePtr node_ptr ;
298
288
@@ -402,14 +392,14 @@ static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xml
402
392
encodePtr enc = NULL ;
403
393
HashTable * ht = Z_OBJPROP_P (data );
404
394
405
- if ((ztype = soap_hash_str_find_deref (ht , "enc_type" , sizeof ("enc_type" )- 1 )) == NULL ||
395
+ if ((ztype = zend_hash_str_find_deref (ht , "enc_type" , sizeof ("enc_type" )- 1 )) == NULL ||
406
396
Z_TYPE_P (ztype ) != IS_LONG ) {
407
397
soap_error0 (E_ERROR , "Encoding: SoapVar has no 'enc_type' property" );
408
398
}
409
399
410
- if ((zstype = soap_hash_str_find_deref (ht , "enc_stype" , sizeof ("enc_stype" )- 1 )) != NULL &&
400
+ if ((zstype = zend_hash_str_find_deref (ht , "enc_stype" , sizeof ("enc_stype" )- 1 )) != NULL &&
411
401
Z_TYPE_P (zstype ) == IS_STRING ) {
412
- if ((zns = soap_hash_str_find_deref (ht , "enc_ns" , sizeof ("enc_ns" )- 1 )) != NULL &&
402
+ if ((zns = zend_hash_str_find_deref (ht , "enc_ns" , sizeof ("enc_ns" )- 1 )) != NULL &&
413
403
Z_TYPE_P (zns ) == IS_STRING ) {
414
404
enc = get_encoder (SOAP_GLOBAL (sdl ), Z_STRVAL_P (zns ), Z_STRVAL_P (zstype ));
415
405
} else {
@@ -436,13 +426,13 @@ static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xml
436
426
enc = encode ;
437
427
}
438
428
439
- zdata = soap_hash_str_find_deref (ht , "enc_value" , sizeof ("enc_value" )- 1 );
429
+ zdata = zend_hash_str_find_deref (ht , "enc_value" , sizeof ("enc_value" )- 1 );
440
430
node = master_to_xml (enc , zdata , style , parent );
441
431
442
432
if (style == SOAP_ENCODED || (SOAP_GLOBAL (sdl ) && encode != enc )) {
443
- if ((zstype = soap_hash_str_find_deref (ht , "enc_stype" , sizeof ("enc_stype" )- 1 )) != NULL &&
433
+ if ((zstype = zend_hash_str_find_deref (ht , "enc_stype" , sizeof ("enc_stype" )- 1 )) != NULL &&
444
434
Z_TYPE_P (zstype ) == IS_STRING ) {
445
- if ((zns = soap_hash_str_find_deref (ht , "enc_ns" , sizeof ("enc_ns" )- 1 )) != NULL &&
435
+ if ((zns = zend_hash_str_find_deref (ht , "enc_ns" , sizeof ("enc_ns" )- 1 )) != NULL &&
446
436
Z_TYPE_P (zns ) == IS_STRING ) {
447
437
set_ns_and_type_ex (node , Z_STRVAL_P (zns ), Z_STRVAL_P (zstype ));
448
438
} else {
@@ -451,11 +441,11 @@ static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xml
451
441
}
452
442
}
453
443
454
- if ((zname = soap_hash_str_find_deref (ht , "enc_name" , sizeof ("enc_name" )- 1 )) != NULL &&
444
+ if ((zname = zend_hash_str_find_deref (ht , "enc_name" , sizeof ("enc_name" )- 1 )) != NULL &&
455
445
Z_TYPE_P (zname ) == IS_STRING ) {
456
446
xmlNodeSetName (node , BAD_CAST (Z_STRVAL_P (zname )));
457
447
}
458
- if ((znamens = soap_hash_str_find_deref (ht , "enc_namens" , sizeof ("enc_namens" )- 1 )) != NULL &&
448
+ if ((znamens = zend_hash_str_find_deref (ht , "enc_namens" , sizeof ("enc_namens" )- 1 )) != NULL &&
459
449
Z_TYPE_P (znamens ) == IS_STRING ) {
460
450
xmlNsPtr nsp = encode_add_ns (node , Z_STRVAL_P (znamens ));
461
451
xmlSetNs (node , nsp );
@@ -1214,7 +1204,7 @@ static zval* get_zval_property(zval* object, char* name, zval *rv)
1214
1204
ZVAL_DEREF (data );
1215
1205
return data ;
1216
1206
} else if (Z_TYPE_P (object ) == IS_ARRAY ) {
1217
- return soap_hash_str_find_deref (Z_ARRVAL_P (object ), name , strlen (name ));
1207
+ return zend_hash_str_find_deref (Z_ARRVAL_P (object ), name , strlen (name ));
1218
1208
}
1219
1209
return NULL ;
1220
1210
}
@@ -1429,7 +1419,7 @@ static zval *to_zval_object_ex(zval *ret, encodeTypePtr type, xmlNodePtr data, z
1429
1419
zval * classname ;
1430
1420
zend_class_entry * tmp ;
1431
1421
1432
- if ((classname = soap_hash_str_find_deref (SOAP_GLOBAL (class_map ), type -> type_str , strlen (type -> type_str ))) != NULL &&
1422
+ if ((classname = zend_hash_str_find_deref (SOAP_GLOBAL (class_map ), type -> type_str , strlen (type -> type_str ))) != NULL &&
1433
1423
Z_TYPE_P (classname ) == IS_STRING &&
1434
1424
(tmp = zend_fetch_class (Z_STR_P (classname ), ZEND_FETCH_CLASS_AUTO )) != NULL ) {
1435
1425
ce = tmp ;
@@ -3535,20 +3525,20 @@ static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *type)
3535
3525
Z_OBJCE_P (tmp ) == soap_var_class_entry ) {
3536
3526
zval * ztype ;
3537
3527
3538
- if ((ztype = soap_hash_str_find_deref (Z_OBJPROP_P (tmp ), "enc_type" , sizeof ("enc_type" )- 1 )) == NULL ||
3528
+ if ((ztype = zend_hash_str_find_deref (Z_OBJPROP_P (tmp ), "enc_type" , sizeof ("enc_type" )- 1 )) == NULL ||
3539
3529
Z_TYPE_P (ztype ) != IS_LONG ) {
3540
3530
soap_error0 (E_ERROR , "Encoding: SoapVar has no 'enc_type' property" );
3541
3531
}
3542
3532
cur_type = Z_LVAL_P (ztype );
3543
3533
3544
- if ((ztype = soap_hash_str_find_deref (Z_OBJPROP_P (tmp ), "enc_stype" , sizeof ("enc_stype" )- 1 )) != NULL &&
3534
+ if ((ztype = zend_hash_str_find_deref (Z_OBJPROP_P (tmp ), "enc_stype" , sizeof ("enc_stype" )- 1 )) != NULL &&
3545
3535
Z_TYPE_P (ztype ) == IS_STRING ) {
3546
3536
cur_stype = Z_STRVAL_P (ztype );
3547
3537
} else {
3548
3538
cur_stype = NULL ;
3549
3539
}
3550
3540
3551
- if ((ztype = soap_hash_str_find_deref (Z_OBJPROP_P (tmp ), "enc_ns" , sizeof ("enc_ns" )- 1 )) != NULL &&
3541
+ if ((ztype = zend_hash_str_find_deref (Z_OBJPROP_P (tmp ), "enc_ns" , sizeof ("enc_ns" )- 1 )) != NULL &&
3552
3542
Z_TYPE_P (ztype ) == IS_STRING ) {
3553
3543
cur_ns = Z_STRVAL_P (ztype );
3554
3544
} else {
0 commit comments