cvs: ZendEngine2 / zend_API.c zend_API.h

From: Date: Sun, 05 Mar 2006 16:09:46 +0000
Subject: cvs: ZendEngine2 / zend_API.c zend_API.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
helly		Sun Mar  5 16:09:46 2006 UTC

  Modified files:              
    /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.352&r2=1.353&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.352 ZendEngine2/zend_API.c:1.353
--- ZendEngine2/zend_API.c:1.352	Fri Mar  3 23:20:29 2006
+++ ZendEngine2/zend_API.c	Sun Mar  5 16:09:45 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.c,v 1.352 2006/03/03 23:20:29 helly Exp $ */
+/* $Id: zend_API.c,v 1.353 2006/03/05 16:09:45 helly Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -3029,6 +3029,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.237&r2=1.238&diff_format=u
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.237 ZendEngine2/zend_API.h:1.238
--- ZendEngine2/zend_API.h:1.237	Sat Mar  4 14:37:50 2006
+++ ZendEngine2/zend_API.h	Sun Mar  5 16:09:45 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.h,v 1.237 2006/03/04 14:37:50 johannes Exp $ */
+/* $Id: zend_API.h,v 1.238 2006/03/05 16:09:45 helly Exp $ */
 
 #ifndef ZEND_API_H
 #define ZEND_API_H
@@ -230,6 +230,7 @@
 ZEND_API int zend_u_declare_property_ex(zend_class_entry *ce, zend_uchar type, zstr name, int
name_length, zval *property, int access_type, char *doc_comment, int doc_comment_len 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);


Thread (1 message)

  • Marcus Boerger
« previous php.zend-engine.cvs (#4671) next »