mirror of
https://github.com/php/php-src.git
synced 2026-04-05 07:02:33 +02:00
Minor updates (mostly __declspec() stuff)
This commit is contained in:
26
Zend/zend.c
26
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user