Lines Matching refs:name

35 	str_free(c->name);  in free_zend_constant()
41 c->name = str_strndup(c->name, c->name_len - 1); in copy_zend_constant()
146 ZEND_API void zend_register_null_constant(const char *name, uint name_len, int flags, int module_nu… in zend_register_null_constant() argument
152 c.name = zend_strndup(name, name_len-1); in zend_register_null_constant()
158 ZEND_API void zend_register_bool_constant(const char *name, uint name_len, zend_bool bval, int flag… in zend_register_bool_constant() argument
164 c.name = zend_strndup(name, name_len-1); in zend_register_bool_constant()
170 ZEND_API void zend_register_long_constant(const char *name, uint name_len, long lval, int flags, in… in zend_register_long_constant() argument
176 c.name = zend_strndup(name, name_len-1); in zend_register_long_constant()
183 ZEND_API void zend_register_double_constant(const char *name, uint name_len, double dval, int flags… in zend_register_double_constant() argument
189 c.name = zend_strndup(name, name_len-1); in zend_register_double_constant()
196 ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, char *strval, uint st… in zend_register_stringl_constant() argument
202 c.name = zend_strndup(name, name_len-1); in zend_register_stringl_constant()
209 ZEND_API void zend_register_string_constant(const char *name, uint name_len, char *strval, int flag… in zend_register_string_constant() argument
211 …zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number TSRMLS… in zend_register_string_constant()
214 static int zend_get_special_constant(const char *name, uint name_len, zend_constant **c TSRMLS_DC) in zend_get_special_constant() argument
222 !memcmp(name, "__CLASS__", sizeof("__CLASS__")-1)) { in zend_get_special_constant()
226 if (EG(scope) && EG(scope)->name) { in zend_get_special_constant()
234 …zend_str_tolower_copy(const_name + sizeof("\0__CLASS__")-1, EG(scope)->name, EG(scope)->name_lengt… in zend_get_special_constant()
238 Z_STRVAL((**c).value) = estrndup(EG(scope)->name, EG(scope)->name_length); in zend_get_special_constant()
254 !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) { in zend_get_special_constant()
273 ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSRMLS_DC) in zend_get_constant() argument
279 if (zend_hash_find(EG(zend_constants), name, name_len+1, (void **) &c) == FAILURE) { in zend_get_constant()
280 lookup_name = zend_str_tolower_dup(name, name_len); in zend_get_constant()
287 retval = zend_get_special_constant(name, name_len, &c TSRMLS_CC); in zend_get_constant()
302 ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, zend_class_entry *… in zend_get_constant_ex() argument
312 if (name[0] == '\\') { in zend_get_constant_ex()
313 name += 1; in zend_get_constant_ex()
318 if ((colon = zend_memrchr(name, ':', name_len)) && in zend_get_constant_ex()
319 colon > name && (*(colon - 1) == ':')) { in zend_get_constant_ex()
320 int class_name_len = colon - name - 1; in zend_get_constant_ex()
325 class_name = estrndup(name, class_name_len); in zend_get_constant_ex()
381 if ((colon = zend_memrchr(name, '\\', name_len)) != NULL) { in zend_get_constant_ex()
383 int prefix_len = colon - name; in zend_get_constant_ex()
389 lcname = zend_str_tolower_dup(name, prefix_len); in zend_get_constant_ex()
419 name = constant_name; in zend_get_constant_ex()
421 return zend_get_constant(name, name_len, result TSRMLS_CC); in zend_get_constant_ex()
435 return zend_get_constant(name, name_len, result TSRMLS_CC); in zend_get_constant_ex()
473 char *name; in zend_register_constant() local
483 lowercase_name = estrndup(c->name, c->name_len-1); in zend_register_constant()
486 name = lowercase_name; in zend_register_constant()
488 char *slash = strrchr(c->name, '\\'); in zend_register_constant()
490 lowercase_name = estrndup(c->name, c->name_len-1); in zend_register_constant()
491 zend_str_tolower(lowercase_name, slash-c->name); in zend_register_constant()
493 name = lowercase_name; in zend_register_constant()
495 name = c->name; in zend_register_constant()
498 chash = str_hash(name, c->name_len-1); in zend_register_constant()
502 && !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) in zend_register_constant()
503 …|| zend_hash_quick_add(EG(zend_constants), name, c->name_len, chash, (void *) c, sizeof(zend_const… in zend_register_constant()
506 if (c->name[0] == '\0' && c->name_len > sizeof("\0__COMPILER_HALT_OFFSET__") in zend_register_constant()
507 && memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) { in zend_register_constant()
508 name++; in zend_register_constant()
510 zend_error(E_NOTICE,"Constant %s already defined", name); in zend_register_constant()
511 str_free(c->name); in zend_register_constant()