summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2001-08-06 13:36:08 +0000
committerThies C. Arntzen <thies@php.net>2001-08-06 13:36:08 +0000
commita35df189b8e6a580261e4cce0339b0f0d2a0d4c3 (patch)
tree8a2b7851615b4a50e3e57c6602a59edd11e7047c /ext/standard
parent89a8b0144cfa16193a1dd1ef2a067baa3969f671 (diff)
downloadphp-git-a35df189b8e6a580261e4cce0339b0f0d2a0d4c3.tar.gz
we can no longer register internal-classes once the script is started.
therefore the "incomplete class" is now registered at MINIT time.
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/basic_functions.c5
-rw-r--r--ext/standard/incomplete_class.c4
-rw-r--r--ext/standard/php_incomplete_class.h4
-rw-r--r--ext/standard/var.c2
4 files changed, 6 insertions, 9 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index cc19b0dfaa..5bd25d7171 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -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 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC)
#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_FUNCTION(basic)
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 @@ PHP_RINIT_FUNCTION(basic)
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
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index 44470006f1..246e8d556c 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -97,9 +97,7 @@ zend_class_entry *php_create_incomplete_class(TSRMLS_D)
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);
}
/* }}} */
diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h
index 7d294f519d..47d54b7b04 100644
--- a/ext/standard/php_incomplete_class.h
+++ b/ext/standard/php_incomplete_class.h
@@ -26,10 +26,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 */ \
if (Z_OBJCE_P(struc) == BG(incomplete_class)) { \
diff --git a/ext/standard/var.c b/ext/standard/var.c
index a47231f36f..66e9625f60 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -525,7 +525,7 @@ PHPAPI int php_var_unserialize(zval **rval, const char **p, const char *max, Has
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;