cvs: ZendEngine2(PHP_5_1) / zend_API.c zend_API.h

From: Date: Sun, 05 Mar 2006 16:12:24 +0000
Subject: cvs: ZendEngine2(PHP_5_1) / zend_API.c zend_API.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4672@lists.php.net to get a copy of this message
helly Sun Mar 5 16:12:24 2006 UTC Modified files: (Branch: PHP_5_1) /ZendEngine2 zend_API.c zend_API.h Log: - Add missing function for completeness http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.c?r1=1.296.2.23&r2=1.296.2.24&diff_format=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.296.2.23 ZendEngine2/zend_API.c:1.296.2.24 --- ZendEngine2/zend_API.c:1.296.2.23 Wed Mar 1 17:21:04 2006 +++ ZendEngine2/zend_API.c Sun Mar 5 16:12:24 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.296.2.23 2006/03/01 17:21:04 helly Exp $ */ +/* $Id: zend_API.c,v 1.296.2.24 2006/03/05 16:12:24 helly Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -2448,6 +2448,20 @@ 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; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.h?r1=1.207.2.7&r2=1.207.2.8&diff_format=u Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.207.2.7 ZendEngine2/zend_API.h:1.207.2.8 --- ZendEngine2/zend_API.h:1.207.2.7 Sat Feb 25 18:25:44 2006 +++ ZendEngine2/zend_API.h Sun Mar 5 16:12:24 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.207.2.7 2006/02/25 18:25:44 helly Exp $ */ +/* $Id: zend_API.h,v 1.207.2.8 2006/03/05 16:12:24 helly Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -223,6 +223,7 @@ 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);

« previous php.zend-engine.cvs (#4672) next »