cvs: ZendEngine2 / zend_compile.c zend_interfaces.c zend_interfaces.h

[email protected] ("Etienne Kneuss")
Newsgroups php.zend-engine.cvs
Message-ID <cvscolder1219597282@cvsserver>
colder		Sun Aug 24 17:01:22 2008 UTC

  Modified files:              
    /ZendEngine2	zend_compile.c zend_interfaces.c zend_interfaces.h 
  Log:
  - Export zend_user_(un)serialize functions to be used by custom callbacks
  - Transfer custom (un)serialize callbacks through inheritance
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.838&r2=1.839&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.838 ZendEngine2/zend_compile.c:1.839
--- ZendEngine2/zend_compile.c:1.838	Fri Aug 22 15:51:50 2008
+++ ZendEngine2/zend_compile.c	Sun Aug 24 17:01:21 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_compile.c,v 1.838 2008/08/22 15:51:50 felipe Exp $ */
+/* $Id: zend_compile.c,v 1.839 2008/08/24 17:01:21 colder Exp $ */
 
 #include <zend_language_parser.h>
 #include "zend.h"
@@ -2891,6 +2891,10 @@
 	/* Inherit interfaces */
 	zend_do_inherit_interfaces(ce, parent_ce TSRMLS_CC);
 
+	/* Copy serialize/unserialize callbacks */
+	ce->serialize   = parent_ce->serialize;
+	ce->unserialize = parent_ce->unserialize;
+
 	/* Inherit properties */
 	zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, NULL, sizeof(zval *), 0);
 	if (parent_ce->type != ce->type) {
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_interfaces.c?r1=1.68&r2=1.69&diff_format=u
Index: ZendEngine2/zend_interfaces.c
diff -u ZendEngine2/zend_interfaces.c:1.68 ZendEngine2/zend_interfaces.c:1.69
--- ZendEngine2/zend_interfaces.c:1.68	Thu Jul 24 10:13:59 2008
+++ ZendEngine2/zend_interfaces.c	Sun Aug 24 17:01:22 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_interfaces.c,v 1.68 2008/07/24 10:13:59 dmitry Exp $ */
+/* $Id: zend_interfaces.c,v 1.69 2008/08/24 17:01:22 colder Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -412,7 +412,7 @@
 /* }}}*/
 
 /* {{{ zend_user_serialize */
-int zend_user_serialize(zval *object, int *type, zstr *buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC)
+ZEND_API int zend_user_serialize(zval *object, int *type, zstr *buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC)
 {
 	zend_class_entry * ce = Z_OBJCE_P(object);
 	zval *retval;
@@ -450,7 +450,7 @@
 /* }}} */
 
 /* {{{ zend_user_unserialize */
-int zend_user_unserialize(zval **object, zend_class_entry *ce, int type, const zstr buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC)
+ZEND_API int zend_user_unserialize(zval **object, zend_class_entry *ce, int type, const zstr buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC)
 {
 	zval * zdata;
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_interfaces.h?r1=1.23&r2=1.24&diff_format=u
Index: ZendEngine2/zend_interfaces.h
diff -u ZendEngine2/zend_interfaces.h:1.23 ZendEngine2/zend_interfaces.h:1.24
--- ZendEngine2/zend_interfaces.h:1.23	Mon Dec 31 07:12:07 2007
+++ ZendEngine2/zend_interfaces.h	Sun Aug 24 17:01:22 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_interfaces.h,v 1.23 2007/12/31 07:12:07 sebastian Exp $ */
+/* $Id: zend_interfaces.h,v 1.24 2008/08/24 17:01:22 colder Exp $ */
 
 #ifndef ZEND_INTERFACES_H
 #define ZEND_INTERFACES_H
@@ -66,6 +66,9 @@
 
 ZEND_API void zend_register_interfaces(TSRMLS_D);
 
+ZEND_API int zend_user_serialize(zval *object, int *type, zstr *buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC);
+ZEND_API int zend_user_unserialize(zval **object, zend_class_entry *ce, int type, const zstr buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC);
+
 END_EXTERN_C()
 
 #endif /* ZEND_INTERFACES_H */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.