File tree Expand file tree Collapse file tree 4 files changed +11
-15
lines changed Expand file tree Collapse file tree 4 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,6 @@ PHPAPI php_basic_globals basic_globals;
108
108
#include "streamsfuncs.h"
109
109
#include "basic_functions_arginfo.h"
110
110
111
- static zend_class_entry * incomplete_class_entry = NULL ;
112
-
113
111
typedef struct _user_tick_function_entry {
114
112
zval * arguments ;
115
113
int arg_count ;
@@ -220,7 +218,6 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p) /* {{{ */
220
218
memset (& BG (mblen_state ), 0 , sizeof (BG (mblen_state )));
221
219
#endif
222
220
223
- BG (incomplete_class ) = incomplete_class_entry ;
224
221
BG (page_uid ) = -1 ;
225
222
BG (page_gid ) = -1 ;
226
223
}
@@ -285,7 +282,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
285
282
#endif
286
283
#endif
287
284
288
- BG ( incomplete_class ) = incomplete_class_entry = php_create_incomplete_class ();
285
+ php_register_incomplete_class ();
289
286
290
287
REGISTER_LONG_CONSTANT ("CONNECTION_ABORTED" , PHP_CONNECTION_ABORTED , CONST_CS | CONST_PERSISTENT );
291
288
REGISTER_LONG_CONSTANT ("CONNECTION_NORMAL" , PHP_CONNECTION_NORMAL , CONST_CS | CONST_PERSISTENT );
Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ typedef struct _php_basic_globals {
97
97
char * syslog_device ;
98
98
99
99
/* var.c */
100
- zend_class_entry * incomplete_class ;
101
100
unsigned serialize_lock ; /* whether to use the locally supplied var_hash instead (__sleep/__wakeup) */
102
101
struct {
103
102
struct php_serialize_data * data ;
Original file line number Diff line number Diff line change 26
26
"unserialize() gets called or provide an autoloader " \
27
27
"to load the class definition"
28
28
29
+ PHPAPI zend_class_entry * php_ce_incomplete_class ;
29
30
static zend_object_handlers php_incomplete_object_handlers ;
30
31
31
32
/* {{{ incomplete_class_message */
@@ -104,9 +105,9 @@ static zend_object *php_create_incomplete_object(zend_class_entry *class_type)
104
105
return object ;
105
106
}
106
107
107
- PHPAPI zend_class_entry * php_create_incomplete_class (void )
108
+ PHPAPI void php_register_incomplete_class (void )
108
109
{
109
- zend_class_entry incomplete_class , * incomplete_class_entry ;
110
+ zend_class_entry incomplete_class ;
110
111
111
112
INIT_CLASS_ENTRY (incomplete_class , INCOMPLETE_CLASS , NULL );
112
113
@@ -120,10 +121,8 @@ PHPAPI zend_class_entry *php_create_incomplete_class(void)
120
121
php_incomplete_object_handlers .get_property_ptr_ptr = incomplete_class_get_property_ptr_ptr ;
121
122
php_incomplete_object_handlers .get_method = incomplete_class_get_method ;
122
123
123
- incomplete_class_entry = zend_register_internal_class (& incomplete_class );
124
- incomplete_class_entry -> ce_flags |= ZEND_ACC_FINAL ;
125
-
126
- return incomplete_class_entry ;
124
+ php_ce_incomplete_class = zend_register_internal_class (& incomplete_class );
125
+ php_ce_incomplete_class -> ce_flags |= ZEND_ACC_FINAL ;
127
126
}
128
127
/* }}} */
129
128
Original file line number Diff line number Diff line change 19
19
20
20
#include "ext/standard/basic_functions.h"
21
21
22
- #define PHP_IC_ENTRY \
23
- BG(incomplete_class)
22
+ extern PHPAPI zend_class_entry * php_ce_incomplete_class ;
23
+
24
+ #define PHP_IC_ENTRY php_ce_incomplete_class
24
25
25
26
#define PHP_SET_CLASS_ATTRIBUTES (struc ) \
26
27
/* OBJECTS_FIXME: Fix for new object model */ \
27
- if (Z_OBJCE_P(struc) == BG(incomplete_class) ) { \
28
+ if (Z_OBJCE_P(struc) == php_ce_incomplete_class ) { \
28
29
class_name = php_lookup_class_name(Z_OBJ_P(struc)); \
29
30
if (!class_name) { \
30
31
class_name = zend_string_init(INCOMPLETE_CLASS, sizeof(INCOMPLETE_CLASS) - 1, 0); \
48
49
extern "C" {
49
50
#endif
50
51
51
- PHPAPI zend_class_entry * php_create_incomplete_class (void );
52
+ PHPAPI void php_register_incomplete_class (void );
52
53
PHPAPI zend_string * php_lookup_class_name (zend_object * object );
53
54
PHPAPI void php_store_class_name (zval * object , const char * name , size_t len );
54
55
You can’t perform that action at this time.
0 commit comments