#endif
/* true multithread-shared globals */
-zend_class_entry standard_class;
+ZEND_API zend_class_entry zend_standard_class_def;
ZEND_API int (*zend_printf)(const char *format, ...);
ZEND_API int (*zend_write)(const char *str, uint str_length);
ZEND_API void (*zend_error)(int type, const char *format, ...);
static void register_standard_class()
{
- standard_class.type = ZEND_INTERNAL_CLASS;
- standard_class.name_length = sizeof("stdClass") - 1;
- standard_class.name = zend_strndup("stdClass", standard_class.name_length);
- standard_class.parent = NULL;
- zend_hash_init(&standard_class.default_properties, 0, NULL, PVAL_PTR_DTOR, 1);
- zend_hash_init(&standard_class.function_table, 0, NULL, (void (*)(void *)) destroy_zend_function, 1);
- standard_class.handle_function_call = NULL;
- standard_class.handle_property_get = NULL;
- standard_class.handle_property_set = NULL;
- standard_class.refcount = (int *) malloc(sizeof(int));
- *standard_class.refcount = 1;
- zend_hash_add(GLOBAL_CLASS_TABLE, "stdClass", sizeof("stdClass"), &standard_class, sizeof(zend_class_entry), NULL);
+ zend_standard_class_def.type = ZEND_INTERNAL_CLASS;
+ zend_standard_class_def.name_length = sizeof("stdClass") - 1;
+ zend_standard_class_def.name = zend_strndup("stdClass", zend_standard_class_def.name_length);
+ zend_standard_class_def.parent = NULL;
+ zend_hash_init(&zend_standard_class_def.default_properties, 0, NULL, PVAL_PTR_DTOR, 1);
+ zend_hash_init(&zend_standard_class_def.function_table, 0, NULL, (void (*)(void *)) destroy_zend_function, 1);
+ zend_standard_class_def.handle_function_call = NULL;
+ zend_standard_class_def.handle_property_get = NULL;
+ zend_standard_class_def.handle_property_set = NULL;
+ zend_standard_class_def.refcount = (int *) malloc(sizeof(int));
+ *zend_standard_class_def.refcount = 1;
+ zend_hash_add(GLOBAL_CLASS_TABLE, "stdClass", sizeof("stdClass"), &zend_standard_class_def, sizeof(zend_class_entry), NULL);
}
void zenderror(char *error);
-extern zend_class_entry standard_class;
+extern ZEND_API zend_class_entry zend_standard_class_def;
extern zend_utility_values zend_uv;
#define ZEND_UV(name) (zend_uv.name)
ZEND_API inline int object_init(zval *arg)
{
- return object_init_ex(arg, &standard_class);
+ return object_init_ex(arg, &zend_standard_class_def);
}
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
-#if !MSVC5
+#if !(WIN32||WINNT)
#define DLEXPORT
#endif
#include "zend_globals.h"
-int le_index_ptr;
+ZEND_API int le_index_ptr;
static inline int zend_list_do_insert(HashTable *list,void *ptr, int type)
{
}
-int zend_list_insert(void *ptr, int type)
+ZEND_API int zend_list_insert(void *ptr, int type)
{
ELS_FETCH();
}
-int zend_plist_insert(void *ptr, int type)
+ZEND_API int zend_plist_insert(void *ptr, int type)
{
ELS_FETCH();
}
-int zend_list_delete(int id)
-{
- ELS_FETCH();
-
- return zend_list_do_delete(&EG(regular_list), id);
-}
-
-
-int zend_list_addref(int id)
+ZEND_API int zend_list_addref(int id)
{
list_entry *le;
ELS_FETCH();
}
}
-int zend_plist_delete(int id)
+
+ZEND_API int zend_list_delete(int id)
+{
+ ELS_FETCH();
+
+ return zend_list_do_delete(&EG(regular_list), id);
+}
+
+
+ZEND_API int zend_plist_delete(int id)
{
ELS_FETCH();
}
-void *zend_list_find(int id, int *type)
+ZEND_API void *zend_list_find(int id, int *type)
{
ELS_FETCH();
}
-void *zend_plist_find(int id, int *type)
+ZEND_API void *zend_plist_find(int id, int *type)
{
ELS_FETCH();
void destroy_resource_list(void);
void destroy_resource_plist(void);
-int zend_list_insert(void *ptr, int type);
-int zend_plist_insert(void *ptr, int type);
-int zend_list_addref(int id);
-int zend_list_delete(int id);
-int zend_plist_delete(int id);
-void *zend_list_find(int id, int *type);
-void *zend_plist_find(int id, int *type);
+ZEND_API int zend_list_insert(void *ptr, int type);
+ZEND_API int zend_plist_insert(void *ptr, int type);
+ZEND_API int zend_list_addref(int id);
+ZEND_API int zend_list_delete(int id);
+ZEND_API int zend_plist_delete(int id);
+ZEND_API void *zend_list_find(int id, int *type);
+ZEND_API void *zend_plist_find(int id, int *type);
+
+extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
#endif
{
switch(opcode) {
case ZEND_BW_NOT:
- return bitwise_not_function;
+ return (unary_op_type) bitwise_not_function;
break;
case ZEND_BOOL_NOT:
- return boolean_not_function;
+ return (unary_op_type) boolean_not_function;
break;
default:
return (unary_op_type) NULL;
op->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init(op->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0);
zend_hash_update(op->value.obj.properties, "scalar", sizeof("scalar"), (void *) &entry, sizeof(zval *), NULL);
- op->value.obj.ce = &standard_class;
+ op->value.obj.ce = &zend_standard_class_def;
op->type = IS_OBJECT;
break;
}
case IS_ARRAY:
op->type = IS_OBJECT;
op->value.obj.properties = op->value.ht;
- op->value.obj.ce = &standard_class;
+ op->value.obj.ce = &zend_standard_class_def;
return;
break;
case IS_OBJECT: