Lines Matching refs:name
35 str_free(c->name); in free_zend_constant()
41 if (!IS_INTERNED(c->name)) { in copy_zend_constant()
42 c->name = zend_strndup(c->name, c->name_len - 1); in copy_zend_constant()
127 c.name = zend_strndup(ZEND_STRL("TRUE")); in zend_register_standard_constants()
133 c.name = zend_strndup(ZEND_STRL("FALSE")); in zend_register_standard_constants()
139 c.name = zend_strndup(ZEND_STRL("NULL")); in zend_register_standard_constants()
146 c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE")); in zend_register_standard_constants()
152 c.name = zend_strndup(ZEND_STRL("ZEND_DEBUG_BUILD")); in zend_register_standard_constants()
179 ZEND_API void zend_register_long_constant(const char *name, uint name_len, long lval, int flags, in… in zend_register_long_constant() argument
186 c.name = zend_strndup(name, name_len-1); in zend_register_long_constant()
193 ZEND_API void zend_register_double_constant(const char *name, uint name_len, double dval, int flags… in zend_register_double_constant() argument
200 c.name = zend_strndup(name, name_len-1); in zend_register_double_constant()
207 ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, char *strval, uint st… in zend_register_stringl_constant() argument
215 c.name = zend_strndup(name, name_len-1); in zend_register_stringl_constant()
222 ZEND_API void zend_register_string_constant(const char *name, uint name_len, char *strval, int flag… in zend_register_string_constant() argument
224 …zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number TSRMLS… in zend_register_string_constant()
227 static int zend_get_special_constant(const char *name, uint name_len, zend_constant **c TSRMLS_DC) in zend_get_special_constant() argument
235 !memcmp(name, "__CLASS__", sizeof("__CLASS__")-1)) { in zend_get_special_constant()
239 if (EG(scope) && EG(scope)->name) { in zend_get_special_constant()
247 …zend_str_tolower_copy(const_name + sizeof("\0__CLASS__")-1, EG(scope)->name, EG(scope)->name_lengt… in zend_get_special_constant()
251 Z_STRVAL((**c).value) = estrndup(EG(scope)->name, EG(scope)->name_length); in zend_get_special_constant()
267 !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) { in zend_get_special_constant()
286 ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSRMLS_DC) in zend_get_constant() argument
292 if (zend_hash_find(EG(zend_constants), name, name_len+1, (void **) &c) == FAILURE) { in zend_get_constant()
293 lookup_name = zend_str_tolower_dup(name, name_len); in zend_get_constant()
300 retval = zend_get_special_constant(name, name_len, &c TSRMLS_CC); in zend_get_constant()
315 ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, zend_class_entry *… in zend_get_constant_ex() argument
325 if (name[0] == '\\') { in zend_get_constant_ex()
326 name += 1; in zend_get_constant_ex()
331 if ((colon = zend_memrchr(name, ':', name_len)) && in zend_get_constant_ex()
332 colon > name && (*(colon - 1) == ':')) { in zend_get_constant_ex()
333 int class_name_len = colon - name - 1; in zend_get_constant_ex()
338 class_name = estrndup(name, class_name_len); in zend_get_constant_ex()
394 if ((colon = zend_memrchr(name, '\\', name_len)) != NULL) { in zend_get_constant_ex()
396 int prefix_len = colon - name; in zend_get_constant_ex()
402 lcname = zend_str_tolower_dup(name, prefix_len); in zend_get_constant_ex()
432 name = constant_name; in zend_get_constant_ex()
434 return zend_get_constant(name, name_len, result TSRMLS_CC); in zend_get_constant_ex()
448 return zend_get_constant(name, name_len, result TSRMLS_CC); in zend_get_constant_ex()
486 char *name; in zend_register_constant() local
496 lowercase_name = estrndup(c->name, c->name_len-1); in zend_register_constant()
499 name = lowercase_name; in zend_register_constant()
502 char *slash = strrchr(c->name, '\\'); in zend_register_constant()
504 lowercase_name = estrndup(c->name, c->name_len-1); in zend_register_constant()
505 zend_str_tolower(lowercase_name, slash-c->name); in zend_register_constant()
507 name = lowercase_name; in zend_register_constant()
511 name = c->name; in zend_register_constant()
515 chash = zend_hash_func(name, c->name_len); in zend_register_constant()
520 && !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) in zend_register_constant()
521 …|| zend_hash_quick_add(EG(zend_constants), name, c->name_len, chash, (void *) c, sizeof(zend_const… in zend_register_constant()
524 if (c->name[0] == '\0' && c->name_len > sizeof("\0__COMPILER_HALT_OFFSET__") in zend_register_constant()
525 && memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) { in zend_register_constant()
526 name++; in zend_register_constant()
528 zend_error(E_NOTICE,"Constant %s already defined", name); in zend_register_constant()
529 str_free(c->name); in zend_register_constant()