Lines Matching refs:arg
221 ZEND_API char *zend_zval_type_name(const zval *arg) /* {{{ */ in zend_zval_type_name() argument
223 return zend_get_type_by_const(Z_TYPE_P(arg)); in zend_zval_type_name()
253 static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ in parse_arg_object_to_string()
255 if (Z_OBJ_HANDLER_PP(arg, cast_object)) { in parse_arg_object_to_string()
258 if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { in parse_arg_object_to_string()
259 zval_ptr_dtor(arg); in parse_arg_object_to_string()
260 *arg = obj; in parse_arg_object_to_string()
266 if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { in parse_arg_object_to_string()
267 SEPARATE_ZVAL_IF_NOT_REF(arg); in parse_arg_object_to_string()
268 if (zend_std_cast_object_tostring(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { in parse_arg_object_to_string()
272 if (!Z_OBJ_HANDLER_PP(arg, cast_object) && Z_OBJ_HANDLER_PP(arg, get)) { in parse_arg_object_to_string()
274 zval *z = Z_OBJ_HANDLER_PP(arg, get)(*arg TSRMLS_CC); in parse_arg_object_to_string()
277 zval_dtor(*arg); in parse_arg_object_to_string()
278 Z_TYPE_P(*arg) = IS_NULL; in parse_arg_object_to_string()
279 zend_make_printable_zval(z, *arg, &use_copy); in parse_arg_object_to_string()
281 ZVAL_ZVAL(*arg, z, 1, 1); in parse_arg_object_to_string()
291 static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **spec, char **error, i… in zend_parse_arg_impl() argument
300 SEPARATE_ZVAL_IF_NOT_REF(arg); in zend_parse_arg_impl()
302 if (Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
316 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
322 if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), p, &d, -1)) == 0) { in zend_parse_arg_impl()
342 if (Z_DVAL_PP(arg) > LONG_MAX) { in zend_parse_arg_impl()
345 } else if (Z_DVAL_PP(arg) < LONG_MIN) { in zend_parse_arg_impl()
353 convert_to_long_ex(arg); in zend_parse_arg_impl()
354 *p = Z_LVAL_PP(arg); in zend_parse_arg_impl()
369 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
375 if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &l, p, -1)) == 0) { in zend_parse_arg_impl()
387 convert_to_double_ex(arg); in zend_parse_arg_impl()
388 *p = Z_DVAL_PP(arg); in zend_parse_arg_impl()
404 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
417 convert_to_string_ex(arg); in zend_parse_arg_impl()
418 if (UNEXPECTED(Z_ISREF_PP(arg) != 0)) { in zend_parse_arg_impl()
422 SEPARATE_ZVAL(arg); in zend_parse_arg_impl()
424 *p = Z_STRVAL_PP(arg); in zend_parse_arg_impl()
425 *pl = Z_STRLEN_PP(arg); in zend_parse_arg_impl()
440 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
446 convert_to_boolean_ex(arg); in zend_parse_arg_impl()
447 *p = Z_BVAL_PP(arg); in zend_parse_arg_impl()
466 if (Z_TYPE_PP(arg) == IS_RESOURCE) { in zend_parse_arg_impl()
467 *p = *arg; in zend_parse_arg_impl()
481 if (Z_TYPE_PP(arg) == IS_ARRAY || (c == 'A' && Z_TYPE_PP(arg) == IS_OBJECT)) { in zend_parse_arg_impl()
482 *p = *arg; in zend_parse_arg_impl()
496 if (Z_TYPE_PP(arg) == IS_ARRAY) { in zend_parse_arg_impl()
497 *p = Z_ARRVAL_PP(arg); in zend_parse_arg_impl()
498 } else if(c == 'H' && Z_TYPE_PP(arg) == IS_OBJECT) { in zend_parse_arg_impl()
499 *p = HASH_OF(*arg); in zend_parse_arg_impl()
516 if (Z_TYPE_PP(arg) == IS_OBJECT) { in zend_parse_arg_impl()
517 *p = *arg; in zend_parse_arg_impl()
533 if (Z_TYPE_PP(arg) == IS_OBJECT && in zend_parse_arg_impl()
534 (!ce || instanceof_function(Z_OBJCE_PP(arg), ce TSRMLS_CC))) { in zend_parse_arg_impl()
535 *p = *arg; in zend_parse_arg_impl()
555 convert_to_string_ex(arg); in zend_parse_arg_impl()
556 if (zend_lookup_class(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &lookup TSRMLS_CC) == FAILURE) { in zend_parse_arg_impl()
564 ce_base->name, Z_STRVAL_PP(arg)); in zend_parse_arg_impl()
571 Z_STRVAL_PP(arg)); in zend_parse_arg_impl()
591 if (zend_fcall_info_init(*arg, 0, fci, fcc, NULL, &is_callable_error TSRMLS_CC) == SUCCESS) { in zend_parse_arg_impl()
618 *p = *arg; in zend_parse_arg_impl()
629 *p = arg; in zend_parse_arg_impl()
644 static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int quiet TSRMLS_DC) /… in zend_parse_arg() argument
649 expected_type = zend_parse_arg_impl(arg_num, arg, va, spec, &error, &severity TSRMLS_CC); in zend_parse_arg()
662 zend_zval_type_name(*arg)); in zend_parse_arg()
681 zval **arg; in zend_parse_va_args() local
693 arg = (zval **) (zend_vm_stack_top(TSRMLS_C) - 1 - (arg_count - max_num_args)); in zend_parse_va_args()
694 if (Z_TYPE_PP(arg) == IS_OBJECT) { in zend_parse_va_args()
695 parse_arg_object_to_string(arg TSRMLS_CC); in zend_parse_va_args()
821 arg = (zval **) (zend_vm_stack_top(TSRMLS_C) - 1 - (arg_count-i)); in zend_parse_va_args()
823 if (zend_parse_arg(i+1, arg, va, &type_spec, quiet TSRMLS_CC) == FAILURE) { in zend_parse_va_args()
959 ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */ in _array_init() argument
961 ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg)); in _array_init()
963 _zend_hash_init(Z_ARRVAL_P(arg), size, NULL, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC); in _array_init()
964 Z_TYPE_P(arg) = IS_ARRAY; in _array_init()
1069 ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *proper… in _object_and_properties_init() argument
1081 Z_TYPE_P(arg) = IS_OBJECT; in _object_and_properties_init()
1083 Z_OBJVAL_P(arg) = zend_objects_new(&object, class_type TSRMLS_CC); in _object_and_properties_init()
1092 Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC); in _object_and_properties_init()
1098 ZEND_API int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_LINE_DC TSRMLS_DC) /… in _object_init_ex() argument
1100 return _object_and_properties_init(arg, class_type, 0 ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); in _object_init_ex()
1104 ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC) /* {{{ */ in _object_init()
1106 return _object_init_ex(arg, zend_standard_class_def ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); in _object_init()
1110 ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_… in add_assoc_function() argument
1117 ZEND_API int add_assoc_long_ex(zval *arg, const char *key, uint key_len, long n) /* {{{ */ in add_assoc_long_ex() argument
1124 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_long_ex()
1128 ZEND_API int add_assoc_null_ex(zval *arg, const char *key, uint key_len) /* {{{ */ in add_assoc_null_ex() argument
1135 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_null_ex()
1139 ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, uint key_len, int b) /* {{{ */ in add_assoc_bool_ex() argument
1146 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_bool_ex()
1150 ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, uint key_len, int r) /* {{{ */ in add_assoc_resource_ex() argument
1157 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_resource_ex()
1161 ZEND_API int add_assoc_double_ex(zval *arg, const char *key, uint key_len, double d) /* {{{ */ in add_assoc_double_ex() argument
1168 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_double_ex()
1172 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
1179 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_string_ex()
1183 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
1190 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_stringl_ex()
1194 ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value) /* {{{ */ in add_assoc_zval_ex() argument
1196 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL); in add_assoc_zval_ex()
1200 ZEND_API int add_index_long(zval *arg, ulong index, long n) /* {{{ */ in add_index_long() argument
1207 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_long()
1211 ZEND_API int add_index_null(zval *arg, ulong index) /* {{{ */ in add_index_null() argument
1218 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_null()
1222 ZEND_API int add_index_bool(zval *arg, ulong index, int b) /* {{{ */ in add_index_bool() argument
1229 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_bool()
1233 ZEND_API int add_index_resource(zval *arg, ulong index, int r) /* {{{ */ in add_index_resource() argument
1240 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_resource()
1244 ZEND_API int add_index_double(zval *arg, ulong index, double d) /* {{{ */ in add_index_double() argument
1251 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_double()
1255 ZEND_API int add_index_string(zval *arg, ulong index, const char *str, int duplicate) /* {{{ */ in add_index_string() argument
1262 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_string()
1266 ZEND_API int add_index_stringl(zval *arg, ulong index, const char *str, uint length, int duplicate)… in add_index_stringl() argument
1273 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_stringl()
1277 ZEND_API int add_index_zval(zval *arg, ulong index, zval *value) /* {{{ */ in add_index_zval() argument
1279 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &value, sizeof(zval *), NULL); in add_index_zval()
1283 ZEND_API int add_next_index_long(zval *arg, long n) /* {{{ */ in add_next_index_long() argument
1290 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_long()
1294 ZEND_API int add_next_index_null(zval *arg) /* {{{ */ in add_next_index_null() argument
1301 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_null()
1305 ZEND_API int add_next_index_bool(zval *arg, int b) /* {{{ */ in add_next_index_bool() argument
1312 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_bool()
1316 ZEND_API int add_next_index_resource(zval *arg, int r) /* {{{ */ in add_next_index_resource() argument
1323 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_resource()
1327 ZEND_API int add_next_index_double(zval *arg, double d) /* {{{ */ in add_next_index_double() argument
1334 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_double()
1338 ZEND_API int add_next_index_string(zval *arg, const char *str, int duplicate) /* {{{ */ in add_next_index_string() argument
1345 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_string()
1349 ZEND_API int add_next_index_stringl(zval *arg, const char *str, uint length, int duplicate) /* {{{ … in add_next_index_stringl() argument
1356 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_stringl()
1360 ZEND_API int add_next_index_zval(zval *arg, zval *value) /* {{{ */ in add_next_index_zval() argument
1362 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL); in add_next_index_zval()
1366 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
1373 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest); in add_get_assoc_string_ex()
1377 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
1384 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest); in add_get_assoc_stringl_ex()
1388 ZEND_API int add_get_index_long(zval *arg, ulong index, long l, void **dest) /* {{{ */ in add_get_index_long() argument
1395 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_long()
1399 ZEND_API int add_get_index_double(zval *arg, ulong index, double d, void **dest) /* {{{ */ in add_get_index_double() argument
1406 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_double()
1410 ZEND_API int add_get_index_string(zval *arg, ulong index, const char *str, void **dest, int duplica… in add_get_index_string() argument
1417 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_string()
1421 ZEND_API int add_get_index_stringl(zval *arg, ulong index, const char *str, uint length, void **des… in add_get_index_stringl() argument
1428 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_stringl()
1432 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
1443 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC); in add_property_long_ex() local
1450 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
1461 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC); in add_property_bool_ex() local
1468 ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRMLS_DC) /* {{{ */ in add_property_null_ex() argument
1479 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC); in add_property_null_ex() local
1486 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
1497 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC); in add_property_resource_ex() local
1504 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
1515 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC); in add_property_double_ex() local
1522 ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplic… in add_property_string_ex() argument
1533 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC); in add_property_string_ex() local
1540 ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint leng… in add_property_stringl_ex() argument
1551 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC); in add_property_stringl_ex() local
1558 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
1565 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, value TSRMLS_CC); in add_property_zval_ex() local
2977 zval **arg, ***params; in zend_fcall_info_args() local
2993 while (zend_hash_get_current_data_ex(Z_ARRVAL_P(args), (void *) &arg, &pos) == SUCCESS) { in zend_fcall_info_args()
2994 *params++ = arg; in zend_fcall_info_args()
3028 zval **arg; in zend_fcall_info_argv() local
3041 arg = va_arg(*argv, zval **); in zend_fcall_info_argv()
3042 fci->params[i] = arg; in zend_fcall_info_argv()