mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
- Add missing function for completeness
This commit is contained in:
parent
a9080d38f4
commit
35ce5db25e
@ -2448,6 +2448,20 @@ ZEND_API int zend_declare_class_constant(zend_class_entry *ce, char *name, size_
|
||||
return zend_hash_update(&ce->constants_table, name, name_length+1, &value, sizeof(zval *), NULL);
|
||||
}
|
||||
|
||||
ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, size_t name_length TSRMLS_DC)
|
||||
{
|
||||
zval *constant;
|
||||
|
||||
if (ce->type & ZEND_INTERNAL_CLASS) {
|
||||
constant = malloc(sizeof(zval));
|
||||
} else {
|
||||
ALLOC_ZVAL(constant);
|
||||
}
|
||||
ZVAL_NULL(constant);
|
||||
INIT_PZVAL(constant);
|
||||
return zend_declare_class_constant(ce, name, name_length, constant TSRMLS_CC);
|
||||
}
|
||||
|
||||
ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, size_t name_length, long value TSRMLS_DC)
|
||||
{
|
||||
zval *constant;
|
||||
|
@ -223,6 +223,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int
|
||||
ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type TSRMLS_DC);
|
||||
|
||||
ZEND_API int zend_declare_class_constant(zend_class_entry *ce, char *name, size_t name_length, zval *value TSRMLS_DC);
|
||||
ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, size_t name_length TSRMLS_DC);
|
||||
ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, size_t name_length, long value TSRMLS_DC);
|
||||
ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, char *name, size_t name_length, zend_bool value TSRMLS_DC);
|
||||
ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, char *name, size_t name_length, double value TSRMLS_DC);
|
||||
|
Loading…
Reference in New Issue
Block a user