thies Mon Aug 6 09:36:09 2001 EDT
Modified files:
/php4/ext/standard basic_functions.c incomplete_class.c
php_incomplete_class.h var.c
/php4/ext/wddx wddx.c
Log:
we can no longer register internal-classes once the script is started.
therefore the "incomplete class" is now registered at MINIT time.
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.378 php4/ext/standard/basic_functions.c:1.379
--- php4/ext/standard/basic_functions.c:1.378 Sun Aug 5 12:21:30 2001
+++ php4/ext/standard/basic_functions.c Mon Aug 6 09:36:08 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.378 2001/08/05 16:21:30 sas Exp $ */
+/* $Id: basic_functions.c,v 1.379 2001/08/06 13:36:08 thies Exp $ */
#include "php.h"
#include "php_main.h"
@@ -26,6 +26,7 @@
#include "internal_functions_registry.h"
#include "php_standard.h"
#include "php_math.h"
+#include "php_incomplete_class.h"
#include "ext/standard/info.h"
#include "zend_operators.h"
#include <stdarg.h>
@@ -722,6 +723,8 @@
#ifdef PHP_WIN32
CoInitialize(NULL);
#endif
+
+ BG(incomplete_class) = php_create_incomplete_class(TSRMLS_C);
}
static void basic_globals_dtor(php_basic_globals *basic_globals_p TSRMLS_DC)
@@ -797,6 +800,7 @@
PHP_MINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU);
#endif
+
if(PG(allow_url_fopen)) {
if (FAILURE==php_register_url_wrapper("http", php_fopen_url_wrap_http TSRMLS_CC)) {
return FAILURE;
@@ -853,7 +857,6 @@
BG(locale_string) = NULL;
BG(user_compare_func_name) = NULL;
BG(array_walk_func_name) = NULL;
- BG(incomplete_class) = NULL;
#ifdef HAVE_MMAP
BG(mmap_file) = NULL;
#endif
Index: php4/ext/standard/incomplete_class.c
diff -u php4/ext/standard/incomplete_class.c:1.10 php4/ext/standard/incomplete_class.c:1.11
--- php4/ext/standard/incomplete_class.c:1.10 Sun Jul 29 21:56:37 2001
+++ php4/ext/standard/incomplete_class.c Mon Aug 6 09:36:08 2001
@@ -17,7 +17,7 @@
*/
-/* $Id: incomplete_class.c,v 1.10 2001/07/30 01:56:37 zeev Exp $ */
+/* $Id: incomplete_class.c,v 1.11 2001/08/06 13:36:08 thies Exp $ */
#include "php.h"
#include "basic_functions.h"
@@ -97,9 +97,7 @@
incomplete_class_get_property,
incomplete_class_set_property);
- BG(incomplete_class) = zend_register_internal_class(&incomplete_class TSRMLS_CC);
-
- return (BG(incomplete_class));
+ return zend_register_internal_class(&incomplete_class TSRMLS_CC);
}
/* }}} */
Index: php4/ext/standard/php_incomplete_class.h
diff -u php4/ext/standard/php_incomplete_class.h:1.6 php4/ext/standard/php_incomplete_class.h:1.7
--- php4/ext/standard/php_incomplete_class.h:1.6 Sun Jul 29 04:14:29 2001
+++ php4/ext/standard/php_incomplete_class.h Mon Aug 6 09:36:08 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_incomplete_class.h,v 1.6 2001/07/29 08:14:29 andi Exp $ */
+/* $Id: php_incomplete_class.h,v 1.7 2001/08/06 13:36:08 thies Exp $ */
#ifndef PHP_INCOMPLETE_CLASS_H
#define PHP_INCOMPLETE_CLASS_H
@@ -25,10 +25,6 @@
#define PHP_IC_ENTRY \
BG(incomplete_class)
-
-#define PHP_IC_ENTRY_READ \
- (PHP_IC_ENTRY ? PHP_IC_ENTRY : php_create_incomplete_class(TSRMLS_C))
-
#define PHP_SET_CLASS_ATTRIBUTES(struc) \
/* OBJECTS_FIXME: Fix for new object model */ \
Index: php4/ext/standard/var.c
diff -u php4/ext/standard/var.c:1.110 php4/ext/standard/var.c:1.111
--- php4/ext/standard/var.c:1.110 Sun Aug 5 12:52:28 2001
+++ php4/ext/standard/var.c Mon Aug 6 09:36:08 2001
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var.c,v 1.110 2001/08/05 16:52:28 sas Exp $ */
+/* $Id: var.c,v 1.111 2001/08/06 13:36:08 thies Exp $ */
/* {{{ includes
@@ -525,7 +525,7 @@
if (zend_hash_find(EG(class_table), class_name, i+1, (void **) &ce)==FAILURE) {
incomplete_class = 1;
- ce = PHP_IC_ENTRY_READ;
+ ce = PHP_IC_ENTRY;
}
} else { /* old php 3.0 data 'o' */
ce = &zend_standard_class_def;
Index: php4/ext/wddx/wddx.c
diff -u php4/ext/wddx/wddx.c:1.76 php4/ext/wddx/wddx.c:1.77
--- php4/ext/wddx/wddx.c:1.76 Tue Jul 31 01:44:08 2001
+++ php4/ext/wddx/wddx.c Mon Aug 6 09:36:08 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: wddx.c,v 1.76 2001/07/31 05:44:08 zeev Exp $ */
+/* $Id: wddx.c,v 1.77 2001/08/06 13:36:08 thies Exp $ */
#include "php.h"
#include "php_wddx.h"
@@ -836,7 +836,7 @@
if (zend_hash_find(EG(class_table), Z_STRVAL_P(ent1->data),
Z_STRLEN_P(ent1->data)+1, (void **) &ce)==FAILURE) {
incomplete_class = 1;
- ce = PHP_IC_ENTRY_READ;
+ ce = PHP_IC_ENTRY;
}
/* Initialize target object */