summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-06-04 11:44:02 +0000
committerZeev Suraski <zeev@php.net>1999-06-04 11:44:02 +0000
commit9108abc28722d7e9c779b37520c280f967059979 (patch)
treef39ff947e1e4638d8760b304225f8b1f8b377330 /Zend
parent3cad348509b66828f421d1b843a025b555519a83 (diff)
downloadphp-git-9108abc28722d7e9c779b37520c280f967059979.tar.gz
Minor updates (mostly __declspec() stuff)
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend.c26
-rw-r--r--Zend/zend.h2
-rw-r--r--Zend/zend_API.c2
-rw-r--r--Zend/zend_API.h2
-rw-r--r--Zend/zend_list.c31
-rw-r--r--Zend/zend_list.h16
-rw-r--r--Zend/zend_opcode.c4
-rw-r--r--Zend/zend_operators.c4
8 files changed, 45 insertions, 42 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index 0ede40804b..7e5cd91775 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -32,7 +32,7 @@
#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, ...);
@@ -161,18 +161,18 @@ static FILE *zend_fopen_wrapper(const char *filename)
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);
}
diff --git a/Zend/zend.h b/Zend/zend.h
index c8bad36681..d4745ce7c9 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -206,7 +206,7 @@ END_EXTERN_C()
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)
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 492289beda..a739fc1da9 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -220,7 +220,7 @@ ZEND_API inline int object_init_ex(zval *arg, zend_class_entry *class_type)
ZEND_API inline int object_init(zval *arg)
{
- return object_init_ex(arg, &standard_class);
+ return object_init_ex(arg, &zend_standard_class_def);
}
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index b413fff842..8b62e0212d 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -77,7 +77,7 @@ ZEND_API void wrong_param_count(void);
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
-#if !MSVC5
+#if !(WIN32||WINNT)
#define DLEXPORT
#endif
diff --git a/Zend/zend_list.c b/Zend/zend_list.c
index 7af4e04056..6285c96970 100644
--- a/Zend/zend_list.c
+++ b/Zend/zend_list.c
@@ -20,7 +20,7 @@
#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)
{
@@ -70,7 +70,7 @@ static inline void *zend_list_do_find(HashTable *list,int id, int *type)
}
-int zend_list_insert(void *ptr, int type)
+ZEND_API int zend_list_insert(void *ptr, int type)
{
ELS_FETCH();
@@ -78,7 +78,7 @@ int zend_list_insert(void *ptr, int type)
}
-int zend_plist_insert(void *ptr, int type)
+ZEND_API int zend_plist_insert(void *ptr, int type)
{
ELS_FETCH();
@@ -86,15 +86,7 @@ int zend_plist_insert(void *ptr, int type)
}
-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();
@@ -108,7 +100,16 @@ int zend_list_addref(int id)
}
}
-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();
@@ -116,7 +117,7 @@ int zend_plist_delete(int id)
}
-void *zend_list_find(int id, int *type)
+ZEND_API void *zend_list_find(int id, int *type)
{
ELS_FETCH();
@@ -124,7 +125,7 @@ void *zend_list_find(int id, int *type)
}
-void *zend_plist_find(int id, int *type)
+ZEND_API void *zend_plist_find(int id, int *type)
{
ELS_FETCH();
diff --git a/Zend/zend_list.h b/Zend/zend_list.h
index 796e1e836e..2e1dfc94ab 100644
--- a/Zend/zend_list.h
+++ b/Zend/zend_list.h
@@ -51,12 +51,14 @@ int init_resource_plist(ELS_D);
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
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 56521aeda6..0d7ac819ac 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -314,10 +314,10 @@ ZEND_API unary_op_type get_unary_op(int opcode)
{
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;
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 8b83162d4d..364848bf08 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -380,7 +380,7 @@ static void convert_scalar_to_array(zval *op, int type)
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;
}
@@ -411,7 +411,7 @@ ZEND_API void convert_to_object(zval *op)
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: