Lines Matching refs:name

40 	if (c->name) {  in free_zend_constant()
41 zend_string_release(c->name); in free_zend_constant()
55 c->name = zend_string_copy(c->name); in copy_zend_constant()
165 ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int flags, int module_… in zend_register_null_constant() argument
171 c.name = zend_string_init(name, name_len, flags & CONST_PERSISTENT); in zend_register_null_constant()
176 ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, zend_bool bval, int fl… in zend_register_bool_constant() argument
182 c.name = zend_string_init(name, name_len, flags & CONST_PERSISTENT); in zend_register_bool_constant()
187 ZEND_API void zend_register_long_constant(const char *name, size_t name_len, zend_long lval, int fl… in zend_register_long_constant() argument
193 c.name = zend_string_init(name, name_len, flags & CONST_PERSISTENT); in zend_register_long_constant()
199 ZEND_API void zend_register_double_constant(const char *name, size_t name_len, double dval, int fla… in zend_register_double_constant() argument
205 c.name = zend_string_init(name, name_len, flags & CONST_PERSISTENT); in zend_register_double_constant()
211 ZEND_API void zend_register_stringl_constant(const char *name, size_t name_len, char *strval, size_… in zend_register_stringl_constant() argument
217 c.name = zend_string_init(name, name_len, flags & CONST_PERSISTENT); in zend_register_stringl_constant()
223 ZEND_API void zend_register_string_constant(const char *name, size_t name_len, char *strval, int fl… in zend_register_string_constant() argument
225 zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number); in zend_register_string_constant()
228 static zend_constant *zend_get_special_constant(const char *name, size_t name_len) in zend_get_special_constant() argument
236 !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) { in zend_get_special_constant()
255 ZEND_API zval *zend_get_constant_str(const char *name, size_t name_len) in zend_get_constant_str() argument
260 if ((c = zend_hash_str_find_ptr(EG(zend_constants), name, name_len)) == NULL) { in zend_get_constant_str()
262 zend_str_tolower_copy(lcname, name, name_len); in zend_get_constant_str()
268 c = zend_get_special_constant(name, name_len); in zend_get_constant_str()
276 ZEND_API zval *zend_get_constant(zend_string *name) in zend_get_constant() argument
281 if ((c = zend_hash_find_ptr(EG(zend_constants), name)) == NULL) { in zend_get_constant()
282 char *lcname = do_alloca(ZSTR_LEN(name) + 1, use_heap); in zend_get_constant()
283 zend_str_tolower_copy(lcname, ZSTR_VAL(name), ZSTR_LEN(name)); in zend_get_constant()
284 if ((c = zend_hash_str_find_ptr(EG(zend_constants), lcname, ZSTR_LEN(name))) != NULL) { in zend_get_constant()
289 c = zend_get_special_constant(ZSTR_VAL(name), ZSTR_LEN(name)); in zend_get_constant()
302 const char *name = ZSTR_VAL(cname); in zend_get_constant_ex() local
306 if (name[0] == '\\') { in zend_get_constant_ex()
307 name += 1; in zend_get_constant_ex()
312 if ((colon = zend_memrchr(name, ':', name_len)) && in zend_get_constant_ex()
313 colon > name && (*(colon - 1) == ':')) { in zend_get_constant_ex()
314 int class_name_len = colon - name - 1; in zend_get_constant_ex()
317 zend_string *class_name = zend_string_init(name, class_name_len, 0); in zend_get_constant_ex()
376 if ((colon = zend_memrchr(name, '\\', name_len)) != NULL) { in zend_get_constant_ex()
378 int prefix_len = colon - name; in zend_get_constant_ex()
387 zend_str_tolower_copy(lcname, name, prefix_len); in zend_get_constant_ex()
416 return zend_get_constant_str(name, name_len); in zend_get_constant_ex()
464 zend_string *name; in zend_register_constant() local
472 lowercase_name = zend_string_alloc(ZSTR_LEN(c->name), c->flags & CONST_PERSISTENT); in zend_register_constant()
473 zend_str_tolower_copy(ZSTR_VAL(lowercase_name), ZSTR_VAL(c->name), ZSTR_LEN(c->name)); in zend_register_constant()
475 name = lowercase_name; in zend_register_constant()
477 char *slash = strrchr(ZSTR_VAL(c->name), '\\'); in zend_register_constant()
479 …lowercase_name = zend_string_init(ZSTR_VAL(c->name), ZSTR_LEN(c->name), c->flags & CONST_PERSISTEN… in zend_register_constant()
480 zend_str_tolower(ZSTR_VAL(lowercase_name), slash - ZSTR_VAL(c->name)); in zend_register_constant()
482 name = lowercase_name; in zend_register_constant()
484 name = c->name; in zend_register_constant()
489 if ((ZSTR_LEN(c->name) == sizeof("__COMPILER_HALT_OFFSET__")-1 in zend_register_constant()
490 && !memcmp(ZSTR_VAL(name), "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) in zend_register_constant()
491 || zend_hash_add_constant(EG(zend_constants), name, c) == NULL) { in zend_register_constant()
494 if (ZSTR_VAL(c->name)[0] == '\0' && ZSTR_LEN(c->name) > sizeof("\0__COMPILER_HALT_OFFSET__")-1 in zend_register_constant()
495 …&& memcmp(ZSTR_VAL(name), "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0… in zend_register_constant()
497 zend_error(E_NOTICE,"Constant %s already defined", ZSTR_VAL(name)); in zend_register_constant()
498 zend_string_release(c->name); in zend_register_constant()