Lines Matching refs:arg

229 ZEND_API char *zend_zval_type_name(const zval *arg) /* {{{ */  in zend_zval_type_name()  argument
231 return zend_get_type_by_const(Z_TYPE_P(arg)); in zend_zval_type_name()
261 static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */ in parse_arg_object_to_string() argument
263 if (Z_OBJ_HANDLER_PP(arg, cast_object)) { in parse_arg_object_to_string()
266 if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { in parse_arg_object_to_string()
267 zval_ptr_dtor(arg); in parse_arg_object_to_string()
268 *arg = obj; in parse_arg_object_to_string()
269 *pl = Z_STRLEN_PP(arg); in parse_arg_object_to_string()
270 *p = Z_STRVAL_PP(arg); in parse_arg_object_to_string()
276 if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { in parse_arg_object_to_string()
277 SEPARATE_ZVAL_IF_NOT_REF(arg); in parse_arg_object_to_string()
278 if (zend_std_cast_object_tostring(*arg, *arg, type TSRMLS_CC) == SUCCESS) { in parse_arg_object_to_string()
279 *pl = Z_STRLEN_PP(arg); in parse_arg_object_to_string()
280 *p = Z_STRVAL_PP(arg); in parse_arg_object_to_string()
284 if (!Z_OBJ_HANDLER_PP(arg, cast_object) && Z_OBJ_HANDLER_PP(arg, get)) { in parse_arg_object_to_string()
286 zval *z = Z_OBJ_HANDLER_PP(arg, get)(*arg TSRMLS_CC); in parse_arg_object_to_string()
289 zval_dtor(*arg); in parse_arg_object_to_string()
290 Z_TYPE_P(*arg) = IS_NULL; in parse_arg_object_to_string()
291 zend_make_printable_zval(z, *arg, &use_copy); in parse_arg_object_to_string()
293 ZVAL_ZVAL(*arg, z, 1, 1); in parse_arg_object_to_string()
295 *pl = Z_STRLEN_PP(arg); in parse_arg_object_to_string()
296 *p = Z_STRVAL_PP(arg); in parse_arg_object_to_string()
305 static const char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, const char **spec, cha… in zend_parse_arg_impl() argument
314 SEPARATE_ZVAL_IF_NOT_REF(arg); in zend_parse_arg_impl()
331 *p = (Z_TYPE_PP(arg) == IS_NULL); in zend_parse_arg_impl()
334 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
340 if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), p, &d, -1)) == 0) { in zend_parse_arg_impl()
360 if (Z_DVAL_PP(arg) > LONG_MAX) { in zend_parse_arg_impl()
363 } else if (Z_DVAL_PP(arg) < LONG_MIN) { in zend_parse_arg_impl()
371 convert_to_long_ex(arg); in zend_parse_arg_impl()
372 *p = Z_LVAL_PP(arg); in zend_parse_arg_impl()
390 *p = (Z_TYPE_PP(arg) == IS_NULL); in zend_parse_arg_impl()
393 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
399 if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &l, p, -1)) == 0) { in zend_parse_arg_impl()
411 convert_to_double_ex(arg); in zend_parse_arg_impl()
412 *p = Z_DVAL_PP(arg); in zend_parse_arg_impl()
429 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
442 convert_to_string_ex(arg); in zend_parse_arg_impl()
443 if (UNEXPECTED(Z_ISREF_PP(arg) != 0)) { in zend_parse_arg_impl()
447 SEPARATE_ZVAL(arg); in zend_parse_arg_impl()
449 *p = Z_STRVAL_PP(arg); in zend_parse_arg_impl()
450 *pl = Z_STRLEN_PP(arg); in zend_parse_arg_impl()
451 if (c == 'p' && CHECK_ZVAL_NULL_PATH(*arg)) { in zend_parse_arg_impl()
457 if (parse_arg_object_to_string(arg, p, pl, IS_STRING TSRMLS_CC) == SUCCESS) { in zend_parse_arg_impl()
458 if (c == 'p' && CHECK_ZVAL_NULL_PATH(*arg)) { in zend_parse_arg_impl()
478 *p = (Z_TYPE_PP(arg) == IS_NULL); in zend_parse_arg_impl()
481 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
487 convert_to_boolean_ex(arg); in zend_parse_arg_impl()
488 *p = Z_BVAL_PP(arg); in zend_parse_arg_impl()
503 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
507 if (Z_TYPE_PP(arg) == IS_RESOURCE) { in zend_parse_arg_impl()
508 *p = *arg; in zend_parse_arg_impl()
518 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
522 if (Z_TYPE_PP(arg) == IS_ARRAY || (c == 'A' && Z_TYPE_PP(arg) == IS_OBJECT)) { in zend_parse_arg_impl()
523 *p = *arg; in zend_parse_arg_impl()
533 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
537 if (Z_TYPE_PP(arg) == IS_ARRAY) { in zend_parse_arg_impl()
538 *p = Z_ARRVAL_PP(arg); in zend_parse_arg_impl()
539 } else if(c == 'H' && Z_TYPE_PP(arg) == IS_OBJECT) { in zend_parse_arg_impl()
540 *p = HASH_OF(*arg); in zend_parse_arg_impl()
553 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
557 if (Z_TYPE_PP(arg) == IS_OBJECT) { in zend_parse_arg_impl()
558 *p = *arg; in zend_parse_arg_impl()
570 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
574 if (Z_TYPE_PP(arg) == IS_OBJECT && in zend_parse_arg_impl()
575 (!ce || instanceof_function(Z_OBJCE_PP(arg), ce TSRMLS_CC))) { in zend_parse_arg_impl()
576 *p = *arg; in zend_parse_arg_impl()
592 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
596 convert_to_string_ex(arg); in zend_parse_arg_impl()
597 if (zend_lookup_class(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &lookup TSRMLS_CC) == FAILURE) { in zend_parse_arg_impl()
605 ce_base->name, Z_STRVAL_PP(arg)); in zend_parse_arg_impl()
612 Z_STRVAL_PP(arg)); in zend_parse_arg_impl()
626 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
632 if (zend_fcall_info_init(*arg, 0, fci, fcc, NULL, &is_callable_error TSRMLS_CC) == SUCCESS) { in zend_parse_arg_impl()
656 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
659 *p = *arg; in zend_parse_arg_impl()
667 if (check_null && Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
670 *p = arg; in zend_parse_arg_impl()
685 static int zend_parse_arg(int arg_num, zval **arg, va_list *va, const char **spec, int quiet TSRMLS… in zend_parse_arg() argument
691 expected_type = zend_parse_arg_impl(arg_num, arg, va, spec, &error, &severity TSRMLS_CC); in zend_parse_arg()
704 zend_zval_type_name(*arg)); in zend_parse_arg()
716 ZEND_API int zend_parse_parameter(int flags, int arg_num TSRMLS_DC, zval **arg, const char *spec, .… in zend_parse_parameter() argument
723 ret = zend_parse_arg(arg_num, arg, &va, &spec, quiet TSRMLS_CC); in zend_parse_parameter()
736 zval **arg; in zend_parse_va_args() local
871 arg = (zval **) (zend_vm_stack_top(TSRMLS_C) - 1 - (arg_count-i)); in zend_parse_va_args()
873 if (zend_parse_arg(i+1, arg, va, &type_spec, quiet TSRMLS_CC) == FAILURE) { in zend_parse_va_args()
1009 ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */ in _array_init() argument
1011 ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg)); in _array_init()
1013 _zend_hash_init(Z_ARRVAL_P(arg), size, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC); in _array_init()
1014 Z_TYPE_P(arg) = IS_ARRAY; in _array_init()
1176 ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *proper… in _object_and_properties_init() argument
1189 Z_TYPE_P(arg) = IS_OBJECT; in _object_and_properties_init()
1191 Z_OBJVAL_P(arg) = zend_objects_new(&object, class_type TSRMLS_CC); in _object_and_properties_init()
1199 Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC); in _object_and_properties_init()
1205 ZEND_API int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_LINE_DC TSRMLS_DC) /… in _object_init_ex() argument
1207 return _object_and_properties_init(arg, class_type, 0 ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); in _object_init_ex()
1211 ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC) /* {{{ */ in _object_init()
1213 return _object_init_ex(arg, zend_standard_class_def ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); in _object_init()
1217 ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_… in add_assoc_function() argument
1224 ZEND_API int add_assoc_long_ex(zval *arg, const char *key, uint key_len, long n) /* {{{ */ in add_assoc_long_ex() argument
1231 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_long_ex()
1235 ZEND_API int add_assoc_null_ex(zval *arg, const char *key, uint key_len) /* {{{ */ in add_assoc_null_ex() argument
1242 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_null_ex()
1246 ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, uint key_len, int b) /* {{{ */ in add_assoc_bool_ex() argument
1253 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_bool_ex()
1257 ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, uint key_len, int r) /* {{{ */ in add_assoc_resource_ex() argument
1264 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_resource_ex()
1268 ZEND_API int add_assoc_double_ex(zval *arg, const char *key, uint key_len, double d) /* {{{ */ in add_assoc_double_ex() argument
1275 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_double_ex()
1279 ZEND_API int add_assoc_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate… in add_assoc_string_ex() argument
1291 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_string_ex()
1295 ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length,… in add_assoc_stringl_ex() argument
1306 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_stringl_ex()
1310 ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value) /* {{{ */ in add_assoc_zval_ex() argument
1312 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL); in add_assoc_zval_ex()
1316 ZEND_API int add_index_long(zval *arg, ulong index, long n) /* {{{ */ in add_index_long() argument
1323 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_long()
1327 ZEND_API int add_index_null(zval *arg, ulong index) /* {{{ */ in add_index_null() argument
1334 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_null()
1338 ZEND_API int add_index_bool(zval *arg, ulong index, int b) /* {{{ */ in add_index_bool() argument
1345 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_bool()
1349 ZEND_API int add_index_resource(zval *arg, ulong index, int r) /* {{{ */ in add_index_resource() argument
1356 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_resource()
1360 ZEND_API int add_index_double(zval *arg, ulong index, double d) /* {{{ */ in add_index_double() argument
1367 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_double()
1371 ZEND_API int add_index_string(zval *arg, ulong index, const char *str, int duplicate) /* {{{ */ in add_index_string() argument
1383 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_string()
1387 ZEND_API int add_index_stringl(zval *arg, ulong index, const char *str, uint length, int duplicate)… in add_index_stringl() argument
1398 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_stringl()
1402 ZEND_API int add_index_zval(zval *arg, ulong index, zval *value) /* {{{ */ in add_index_zval() argument
1404 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &value, sizeof(zval *), NULL); in add_index_zval()
1408 ZEND_API int add_next_index_long(zval *arg, long n) /* {{{ */ in add_next_index_long() argument
1415 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_long()
1419 ZEND_API int add_next_index_null(zval *arg) /* {{{ */ in add_next_index_null() argument
1426 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_null()
1430 ZEND_API int add_next_index_bool(zval *arg, int b) /* {{{ */ in add_next_index_bool() argument
1437 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_bool()
1441 ZEND_API int add_next_index_resource(zval *arg, int r) /* {{{ */ in add_next_index_resource() argument
1448 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_resource()
1452 ZEND_API int add_next_index_double(zval *arg, double d) /* {{{ */ in add_next_index_double() argument
1459 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_double()
1463 ZEND_API int add_next_index_string(zval *arg, const char *str, int duplicate) /* {{{ */ in add_next_index_string() argument
1470 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_string()
1474 ZEND_API int add_next_index_stringl(zval *arg, const char *str, uint length, int duplicate) /* {{{ … in add_next_index_stringl() argument
1484 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_stringl()
1488 ZEND_API int add_next_index_zval(zval *arg, zval *value) /* {{{ */ in add_next_index_zval() argument
1490 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL); in add_next_index_zval()
1494 ZEND_API int add_get_assoc_string_ex(zval *arg, const char *key, uint key_len, const char *str, voi… in add_get_assoc_string_ex() argument
1506 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest); in add_get_assoc_string_ex()
1510 ZEND_API int add_get_assoc_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, ui… in add_get_assoc_stringl_ex() argument
1521 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest); in add_get_assoc_stringl_ex()
1525 ZEND_API int add_get_index_long(zval *arg, ulong index, long l, void **dest) /* {{{ */ in add_get_index_long() argument
1532 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_long()
1536 ZEND_API int add_get_index_double(zval *arg, ulong index, double d, void **dest) /* {{{ */ in add_get_index_double() argument
1543 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_double()
1547 ZEND_API int add_get_index_string(zval *arg, ulong index, const char *str, void **dest, int duplica… in add_get_index_string() argument
1554 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_string()
1558 ZEND_API int add_get_index_stringl(zval *arg, ulong index, const char *str, uint length, void **des… in add_get_index_stringl() argument
1565 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_stringl()
1603 ZEND_API int add_property_long_ex(zval *arg, const char *key, uint key_len, long n TSRMLS_DC) /* {{… in add_property_long_ex() argument
1614 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_long_ex()
1621 ZEND_API int add_property_bool_ex(zval *arg, const char *key, uint key_len, int b TSRMLS_DC) /* {{{… in add_property_bool_ex() argument
1632 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_bool_ex()
1639 ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRMLS_DC) /* {{{ */ in add_property_null_ex() argument
1650 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_null_ex()
1657 ZEND_API int add_property_resource_ex(zval *arg, const char *key, uint key_len, long n TSRMLS_DC) /… in add_property_resource_ex() argument
1668 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_resource_ex()
1675 ZEND_API int add_property_double_ex(zval *arg, const char *key, uint key_len, double d TSRMLS_DC) /… in add_property_double_ex() argument
1686 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_double_ex()
1693 ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, const char *str, int … in add_property_string_ex() argument
1709 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_string_ex()
1716 ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, uin… in add_property_stringl_ex() argument
1731 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_stringl_ex()
1738 ZEND_API int add_property_zval_ex(zval *arg, const char *key, uint key_len, zval *value TSRMLS_DC) … in add_property_zval_ex() argument
1745 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, value, 0 TSRMLS_CC); in add_property_zval_ex()
3346 zval **arg, ***params; in zend_fcall_info_args() local
3362 while (zend_hash_get_current_data_ex(Z_ARRVAL_P(args), (void *) &arg, &pos) == SUCCESS) { in zend_fcall_info_args()
3363 *params++ = arg; in zend_fcall_info_args()
3397 zval **arg; in zend_fcall_info_argv() local
3410 arg = va_arg(*argv, zval **); in zend_fcall_info_argv()
3411 fci->params[i] = arg; in zend_fcall_info_argv()