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()
316 if (Z_TYPE_PP(arg) == IS_NULL) { in zend_parse_arg_impl()
330 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
336 if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), p, &d, -1)) == 0) { in zend_parse_arg_impl()
356 if (Z_DVAL_PP(arg) > LONG_MAX) { in zend_parse_arg_impl()
359 } else if (Z_DVAL_PP(arg) < LONG_MIN) { in zend_parse_arg_impl()
367 convert_to_long_ex(arg); in zend_parse_arg_impl()
368 *p = Z_LVAL_PP(arg); in zend_parse_arg_impl()
383 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
389 if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &l, p, -1)) == 0) { in zend_parse_arg_impl()
401 convert_to_double_ex(arg); in zend_parse_arg_impl()
402 *p = Z_DVAL_PP(arg); in zend_parse_arg_impl()
419 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
432 convert_to_string_ex(arg); in zend_parse_arg_impl()
433 if (UNEXPECTED(Z_ISREF_PP(arg) != 0)) { in zend_parse_arg_impl()
437 SEPARATE_ZVAL(arg); in zend_parse_arg_impl()
439 *p = Z_STRVAL_PP(arg); in zend_parse_arg_impl()
440 *pl = Z_STRLEN_PP(arg); in zend_parse_arg_impl()
441 if (c == 'p' && CHECK_ZVAL_NULL_PATH(*arg)) { in zend_parse_arg_impl()
447 if (parse_arg_object_to_string(arg, p, pl, IS_STRING TSRMLS_CC) == SUCCESS) { in zend_parse_arg_impl()
448 if (c == 'p' && CHECK_ZVAL_NULL_PATH(*arg)) { in zend_parse_arg_impl()
465 switch (Z_TYPE_PP(arg)) { in zend_parse_arg_impl()
471 convert_to_boolean_ex(arg); in zend_parse_arg_impl()
472 *p = Z_BVAL_PP(arg); in zend_parse_arg_impl()
491 if (Z_TYPE_PP(arg) == IS_RESOURCE) { in zend_parse_arg_impl()
492 *p = *arg; in zend_parse_arg_impl()
506 if (Z_TYPE_PP(arg) == IS_ARRAY || (c == 'A' && Z_TYPE_PP(arg) == IS_OBJECT)) { in zend_parse_arg_impl()
507 *p = *arg; in zend_parse_arg_impl()
521 if (Z_TYPE_PP(arg) == IS_ARRAY) { in zend_parse_arg_impl()
522 *p = Z_ARRVAL_PP(arg); in zend_parse_arg_impl()
523 } else if(c == 'H' && Z_TYPE_PP(arg) == IS_OBJECT) { in zend_parse_arg_impl()
524 *p = HASH_OF(*arg); in zend_parse_arg_impl()
541 if (Z_TYPE_PP(arg) == IS_OBJECT) { in zend_parse_arg_impl()
542 *p = *arg; in zend_parse_arg_impl()
558 if (Z_TYPE_PP(arg) == IS_OBJECT && in zend_parse_arg_impl()
559 (!ce || instanceof_function(Z_OBJCE_PP(arg), ce TSRMLS_CC))) { in zend_parse_arg_impl()
560 *p = *arg; in zend_parse_arg_impl()
580 convert_to_string_ex(arg); in zend_parse_arg_impl()
581 if (zend_lookup_class(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &lookup TSRMLS_CC) == FAILURE) { in zend_parse_arg_impl()
589 ce_base->name, Z_STRVAL_PP(arg)); in zend_parse_arg_impl()
596 Z_STRVAL_PP(arg)); in zend_parse_arg_impl()
616 if (zend_fcall_info_init(*arg, 0, fci, fcc, NULL, &is_callable_error TSRMLS_CC) == SUCCESS) { in zend_parse_arg_impl()
643 *p = *arg; in zend_parse_arg_impl()
654 *p = arg; in zend_parse_arg_impl()
669 static int zend_parse_arg(int arg_num, zval **arg, va_list *va, const char **spec, int quiet TSRMLS… in zend_parse_arg() argument
675 expected_type = zend_parse_arg_impl(arg_num, arg, va, spec, &error, &severity TSRMLS_CC); in zend_parse_arg()
688 zend_zval_type_name(*arg)); in zend_parse_arg()
707 zval **arg; in zend_parse_va_args() local
842 arg = (zval **) (zend_vm_stack_top(TSRMLS_C) - 1 - (arg_count-i)); in zend_parse_va_args()
844 if (zend_parse_arg(i+1, arg, va, &type_spec, quiet TSRMLS_CC) == FAILURE) { in zend_parse_va_args()
980 ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */ in _array_init() argument
982 ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg)); in _array_init()
984 _zend_hash_init(Z_ARRVAL_P(arg), size, NULL, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC); in _array_init()
985 Z_TYPE_P(arg) = IS_ARRAY; in _array_init()
1148 ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *proper… in _object_and_properties_init() argument
1161 Z_TYPE_P(arg) = IS_OBJECT; in _object_and_properties_init()
1163 Z_OBJVAL_P(arg) = zend_objects_new(&object, class_type TSRMLS_CC); in _object_and_properties_init()
1171 Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC); in _object_and_properties_init()
1177 ZEND_API int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_LINE_DC TSRMLS_DC) /… in _object_init_ex() argument
1179 return _object_and_properties_init(arg, class_type, 0 ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); in _object_init_ex()
1183 ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC) /* {{{ */ in _object_init()
1185 return _object_init_ex(arg, zend_standard_class_def ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); in _object_init()
1189 ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_… in add_assoc_function() argument
1196 ZEND_API int add_assoc_long_ex(zval *arg, const char *key, uint key_len, long n) /* {{{ */ in add_assoc_long_ex() argument
1203 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_long_ex()
1207 ZEND_API int add_assoc_null_ex(zval *arg, const char *key, uint key_len) /* {{{ */ in add_assoc_null_ex() argument
1214 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_null_ex()
1218 ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, uint key_len, int b) /* {{{ */ in add_assoc_bool_ex() argument
1225 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_bool_ex()
1229 ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, uint key_len, int r) /* {{{ */ in add_assoc_resource_ex() argument
1236 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_resource_ex()
1240 ZEND_API int add_assoc_double_ex(zval *arg, const char *key, uint key_len, double d) /* {{{ */ in add_assoc_double_ex() argument
1247 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_double_ex()
1251 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
1258 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_string_ex()
1262 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
1269 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); in add_assoc_stringl_ex()
1273 ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value) /* {{{ */ in add_assoc_zval_ex() argument
1275 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL); in add_assoc_zval_ex()
1279 ZEND_API int add_index_long(zval *arg, ulong index, long n) /* {{{ */ in add_index_long() argument
1286 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_long()
1290 ZEND_API int add_index_null(zval *arg, ulong index) /* {{{ */ in add_index_null() argument
1297 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_null()
1301 ZEND_API int add_index_bool(zval *arg, ulong index, int b) /* {{{ */ in add_index_bool() argument
1308 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_bool()
1312 ZEND_API int add_index_resource(zval *arg, ulong index, int r) /* {{{ */ in add_index_resource() argument
1319 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_resource()
1323 ZEND_API int add_index_double(zval *arg, ulong index, double d) /* {{{ */ in add_index_double() argument
1330 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_double()
1334 ZEND_API int add_index_string(zval *arg, ulong index, const char *str, int duplicate) /* {{{ */ in add_index_string() argument
1341 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_string()
1345 ZEND_API int add_index_stringl(zval *arg, ulong index, const char *str, uint length, int duplicate)… in add_index_stringl() argument
1352 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); in add_index_stringl()
1356 ZEND_API int add_index_zval(zval *arg, ulong index, zval *value) /* {{{ */ in add_index_zval() argument
1358 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &value, sizeof(zval *), NULL); in add_index_zval()
1362 ZEND_API int add_next_index_long(zval *arg, long n) /* {{{ */ in add_next_index_long() argument
1369 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_long()
1373 ZEND_API int add_next_index_null(zval *arg) /* {{{ */ in add_next_index_null() argument
1380 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_null()
1384 ZEND_API int add_next_index_bool(zval *arg, int b) /* {{{ */ in add_next_index_bool() argument
1391 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_bool()
1395 ZEND_API int add_next_index_resource(zval *arg, int r) /* {{{ */ in add_next_index_resource() argument
1402 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_resource()
1406 ZEND_API int add_next_index_double(zval *arg, double d) /* {{{ */ in add_next_index_double() argument
1413 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_double()
1417 ZEND_API int add_next_index_string(zval *arg, const char *str, int duplicate) /* {{{ */ in add_next_index_string() argument
1424 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_string()
1428 ZEND_API int add_next_index_stringl(zval *arg, const char *str, uint length, int duplicate) /* {{{ … in add_next_index_stringl() argument
1435 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); in add_next_index_stringl()
1439 ZEND_API int add_next_index_zval(zval *arg, zval *value) /* {{{ */ in add_next_index_zval() argument
1441 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL); in add_next_index_zval()
1445 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
1452 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest); in add_get_assoc_string_ex()
1456 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
1463 return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest); in add_get_assoc_stringl_ex()
1467 ZEND_API int add_get_index_long(zval *arg, ulong index, long l, void **dest) /* {{{ */ in add_get_index_long() argument
1474 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_long()
1478 ZEND_API int add_get_index_double(zval *arg, ulong index, double d, void **dest) /* {{{ */ in add_get_index_double() argument
1485 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_double()
1489 ZEND_API int add_get_index_string(zval *arg, ulong index, const char *str, void **dest, int duplica… in add_get_index_string() argument
1496 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_string()
1500 ZEND_API int add_get_index_stringl(zval *arg, ulong index, const char *str, uint length, void **des… in add_get_index_stringl() argument
1507 return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); in add_get_index_stringl()
1511 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
1522 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_long_ex()
1529 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
1540 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_bool_ex()
1547 ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRMLS_DC) /* {{{ */ in add_property_null_ex() argument
1558 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_null_ex()
1565 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
1576 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_resource_ex()
1583 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
1594 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_double_ex()
1601 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
1612 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_string_ex()
1619 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
1630 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC); in add_property_stringl_ex()
1637 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
1644 Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, value, 0 TSRMLS_CC); in add_property_zval_ex()
3227 zval **arg, ***params; in zend_fcall_info_args() local
3243 while (zend_hash_get_current_data_ex(Z_ARRVAL_P(args), (void *) &arg, &pos) == SUCCESS) { in zend_fcall_info_args()
3244 *params++ = arg; in zend_fcall_info_args()
3278 zval **arg; in zend_fcall_info_argv() local
3291 arg = va_arg(*argv, zval **); in zend_fcall_info_argv()
3292 fci->params[i] = arg; in zend_fcall_info_argv()