cvs: ZendEngine2 / zend.h zend_API.h zend_iterators.h zend_operators.h zend_variables.h
| From: | Hartmut Holzgraefe | Date: | Fri, 20 Feb 2004 08:03:27 +0000 |
| Subject: | cvs: ZendEngine2 / zend.h zend_API.h zend_iterators.h zend_operators.h zend_variables.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2386@lists.php.net to get a copy of this message | ||
hholzgra Fri Feb 20 03:03:27 2004 EDT
Modified files:
/ZendEngine2 zend.h zend_API.h zend_iterators.h zend_operators.h
zend_variables.h
Log:
more EXTERN_C wrapping of ZEND_API prototypes
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.233&r2=1.234&ty=u Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.233 ZendEngine2/zend.h:1.234 --- ZendEngine2/zend.h:1.233 Wed Feb 18 17:44:40 2004 +++ ZendEngine2/zend.h Fri Feb 20 03:03:27 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.233 2004/02/18 22:44:40 hholzgra Exp $ */ +/* $Id: zend.h,v 1.234 2004/02/20 08:03:27 hholzgra Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -460,8 +460,9 @@ ZEND_API extern char *empty_string; +BEGIN_EXTERN_C() ZEND_API void free_estring(char **str_p); - +END_EXTERN_C() #define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); } #define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); } @@ -513,9 +514,9 @@ BEGIN_EXTERN_C() ZEND_API void zend_message_dispatcher(long message, void *data); -END_EXTERN_C() ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents); +END_EXTERN_C() /* Messages for applications of Zend */ http://cvs.php.net/diff.php/ZendEngine2/zend_API.h?r1=1.178&r2=1.179&ty=u Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.178 ZendEngine2/zend_API.h:1.179 --- ZendEngine2/zend_API.h:1.178 Thu Feb 12 08:49:54 2004 +++ ZendEngine2/zend_API.h Fri Feb 20 03:03:27 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.178 2004/02/12 13:49:54 zeev Exp $ */ +/* $Id: zend_API.h,v 1.179 2004/02/20 08:03:27 hholzgra Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -139,6 +139,7 @@ int zend_next_free_module(void); +BEGIN_EXTERN_C() ZEND_API int zend_get_parameters(int ht, int param_count, ...); ZEND_API int _zend_get_parameters_array(int ht, int param_count, zval **argument_array TSRMLS_DC); ZEND_API int zend_get_parameters_ex(int param_count, ...); @@ -296,6 +297,7 @@ ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC); ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, zend_uint param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC); +END_EXTERN_C() typedef struct _zend_fcall_info { size_t size; @@ -316,6 +318,7 @@ zval **object_pp; } zend_fcall_info_cache; +BEGIN_EXTERN_C() ZEND_API extern zend_fcall_info_cache empty_fcall_info_cache; ZEND_API int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC); @@ -328,6 +331,7 @@ ZEND_API ZEND_FUNCTION(display_disabled_function); ZEND_API ZEND_FUNCTION(display_disabled_class); +END_EXTERN_C() #if ZEND_DEBUG #define CHECK_ZVAL_STRING(z) \ http://cvs.php.net/diff.php/ZendEngine2/zend_iterators.h?r1=1.6&r2=1.7&ty=u Index: ZendEngine2/zend_iterators.h diff -u ZendEngine2/zend_iterators.h:1.6 ZendEngine2/zend_iterators.h:1.7 --- ZendEngine2/zend_iterators.h:1.6 Sun Jan 25 08:32:02 2004 +++ ZendEngine2/zend_iterators.h Fri Feb 20 03:03:27 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_iterators.h,v 1.6 2004/01/25 13:32:02 helly Exp $ */ +/* $Id: zend_iterators.h,v 1.7 2004/02/20 08:03:27 hholzgra Exp $ */ /* These iterators were designed to operate within the foreach() * structures provided by the engine, but could be extended for use @@ -74,6 +74,7 @@ ZEND_ITER_OBJECT }; +BEGIN_EXTERN_C() /* given a zval, returns stuff that can be used to iterate it. */ ZEND_API enum zend_object_iterator_kind zend_iterator_unwrap(zval *array_ptr, zend_object_iterator **iter TSRMLS_DC); @@ -81,6 +82,7 @@ ZEND_API zval *zend_iterator_wrap(zend_object_iterator *iter TSRMLS_DC); ZEND_API void zend_register_iterator_wrapper(TSRMLS_D); +END_EXTERN_C() /* * Local variables: http://cvs.php.net/diff.php/ZendEngine2/zend_operators.h?r1=1.85&r2=1.86&ty=u Index: ZendEngine2/zend_operators.h diff -u ZendEngine2/zend_operators.h:1.85 ZendEngine2/zend_operators.h:1.86 --- ZendEngine2/zend_operators.h:1.85 Wed Jan 14 03:50:17 2004 +++ ZendEngine2/zend_operators.h Fri Feb 20 03:03:27 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.h,v 1.85 2004/01/14 08:50:17 andi Exp $ */ +/* $Id: zend_operators.h,v 1.86 2004/02/20 08:03:27 hholzgra Exp $ */ #ifndef ZEND_OPERATORS_H #define ZEND_OPERATORS_H @@ -37,6 +37,7 @@ #define MAX_LENGTH_OF_LONG 18 #define MAX_LENGTH_OF_DOUBLE 32 +BEGIN_EXTERN_C() ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); @@ -61,6 +62,7 @@ ZEND_API zend_bool instanceof_function_ex(zend_class_entry *instance_ce, zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC); ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class_entry *ce TSRMLS_DC); +END_EXTERN_C() static inline zend_bool is_numeric_string(char *str, int length, long *lval, double *dval, zend_bool allow_errors) { @@ -169,10 +171,11 @@ return NULL; } + +BEGIN_EXTERN_C() ZEND_API int increment_function(zval *op1); ZEND_API int decrement_function(zval *op2); -BEGIN_EXTERN_C() ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC); ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC); ZEND_API void convert_to_long(zval *op); @@ -190,7 +193,6 @@ #define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC) ZEND_API double zend_string_to_double(const char *number, zend_uint length); -END_EXTERN_C() ZEND_API int zval_is_true(zval *op); ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); @@ -199,6 +201,7 @@ ZEND_API void zend_str_tolower(char *str, unsigned int length); ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned int length); +END_EXTERN_C() static inline char * zend_str_tolower_dup(const char *source, unsigned int length) @@ -206,6 +209,7 @@ return zend_str_tolower_copy((char *)emalloc(length+1), source, length); } +BEGIN_EXTERN_C() ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2); ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3); ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2); @@ -223,7 +227,7 @@ ZEND_API int zend_atoi(const char *str, int str_len); ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC); - +END_EXTERN_C() #define convert_to_ex_master(ppzv, lower_type, upper_type) \ if ((*ppzv)->type!=IS_##upper_type) { \ SEPARATE_ZVAL_IF_NOT_REF(ppzv); \ http://cvs.php.net/diff.php/ZendEngine2/zend_variables.h?r1=1.28&r2=1.29&ty=u Index: ZendEngine2/zend_variables.h diff -u ZendEngine2/zend_variables.h:1.28 ZendEngine2/zend_variables.h:1.29 --- ZendEngine2/zend_variables.h:1.28 Thu Jan 8 12:31:48 2004 +++ ZendEngine2/zend_variables.h Fri Feb 20 03:03:27 2004 @@ -17,15 +17,15 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_variables.h,v 1.28 2004/01/08 17:31:48 sniper Exp $ */ +/* $Id: zend_variables.h,v 1.29 2004/02/20 08:03:27 hholzgra Exp $ */ #ifndef ZEND_VARIABLES_H #define ZEND_VARIABLES_H -ZEND_API int zend_print_variable(zval *var); BEGIN_EXTERN_C() +ZEND_API int zend_print_variable(zval *var); ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC); ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC); ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC); @@ -56,11 +56,10 @@ #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor #endif -END_EXTERN_C() - - ZEND_API void zval_add_ref(zval **p); +END_EXTERN_C() + #define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper #define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper #define ZVAL_INTERNAL_DTOR (void (*)(void *)) zval_internal_dtor_wrapper
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.233&r2=1.234&ty=u Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.233 ZendEngine2/zend.h:1.234 --- ZendEngine2/zend.h:1.233 Wed Feb 18 17:44:40 2004 +++ ZendEngine2/zend.h Fri Feb 20 03:03:27 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.233 2004/02/18 22:44:40 hholzgra Exp $ */ +/* $Id: zend.h,v 1.234 2004/02/20 08:03:27 hholzgra Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -460,8 +460,9 @@ ZEND_API extern char *empty_string; +BEGIN_EXTERN_C() ZEND_API void free_estring(char **str_p); - +END_EXTERN_C() #define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); } #define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); } @@ -513,9 +514,9 @@ BEGIN_EXTERN_C() ZEND_API void zend_message_dispatcher(long message, void *data); -END_EXTERN_C() ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents); +END_EXTERN_C() /* Messages for applications of Zend */ http://cvs.php.net/diff.php/ZendEngine2/zend_API.h?r1=1.178&r2=1.179&ty=u Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.178 ZendEngine2/zend_API.h:1.179 --- ZendEngine2/zend_API.h:1.178 Thu Feb 12 08:49:54 2004 +++ ZendEngine2/zend_API.h Fri Feb 20 03:03:27 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.178 2004/02/12 13:49:54 zeev Exp $ */ +/* $Id: zend_API.h,v 1.179 2004/02/20 08:03:27 hholzgra Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -139,6 +139,7 @@ int zend_next_free_module(void); +BEGIN_EXTERN_C() ZEND_API int zend_get_parameters(int ht, int param_count, ...); ZEND_API int _zend_get_parameters_array(int ht, int param_count, zval **argument_array TSRMLS_DC); ZEND_API int zend_get_parameters_ex(int param_count, ...); @@ -296,6 +297,7 @@ ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC); ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, zend_uint param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC); +END_EXTERN_C() typedef struct _zend_fcall_info { size_t size; @@ -316,6 +318,7 @@ zval **object_pp; } zend_fcall_info_cache; +BEGIN_EXTERN_C() ZEND_API extern zend_fcall_info_cache empty_fcall_info_cache; ZEND_API int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC); @@ -328,6 +331,7 @@ ZEND_API ZEND_FUNCTION(display_disabled_function); ZEND_API ZEND_FUNCTION(display_disabled_class); +END_EXTERN_C() #if ZEND_DEBUG #define CHECK_ZVAL_STRING(z) \ http://cvs.php.net/diff.php/ZendEngine2/zend_iterators.h?r1=1.6&r2=1.7&ty=u Index: ZendEngine2/zend_iterators.h diff -u ZendEngine2/zend_iterators.h:1.6 ZendEngine2/zend_iterators.h:1.7 --- ZendEngine2/zend_iterators.h:1.6 Sun Jan 25 08:32:02 2004 +++ ZendEngine2/zend_iterators.h Fri Feb 20 03:03:27 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_iterators.h,v 1.6 2004/01/25 13:32:02 helly Exp $ */ +/* $Id: zend_iterators.h,v 1.7 2004/02/20 08:03:27 hholzgra Exp $ */ /* These iterators were designed to operate within the foreach() * structures provided by the engine, but could be extended for use @@ -74,6 +74,7 @@ ZEND_ITER_OBJECT }; +BEGIN_EXTERN_C() /* given a zval, returns stuff that can be used to iterate it. */ ZEND_API enum zend_object_iterator_kind zend_iterator_unwrap(zval *array_ptr, zend_object_iterator **iter TSRMLS_DC); @@ -81,6 +82,7 @@ ZEND_API zval *zend_iterator_wrap(zend_object_iterator *iter TSRMLS_DC); ZEND_API void zend_register_iterator_wrapper(TSRMLS_D); +END_EXTERN_C() /* * Local variables: http://cvs.php.net/diff.php/ZendEngine2/zend_operators.h?r1=1.85&r2=1.86&ty=u Index: ZendEngine2/zend_operators.h diff -u ZendEngine2/zend_operators.h:1.85 ZendEngine2/zend_operators.h:1.86 --- ZendEngine2/zend_operators.h:1.85 Wed Jan 14 03:50:17 2004 +++ ZendEngine2/zend_operators.h Fri Feb 20 03:03:27 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.h,v 1.85 2004/01/14 08:50:17 andi Exp $ */ +/* $Id: zend_operators.h,v 1.86 2004/02/20 08:03:27 hholzgra Exp $ */ #ifndef ZEND_OPERATORS_H #define ZEND_OPERATORS_H @@ -37,6 +37,7 @@ #define MAX_LENGTH_OF_LONG 18 #define MAX_LENGTH_OF_DOUBLE 32 +BEGIN_EXTERN_C() ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); @@ -61,6 +62,7 @@ ZEND_API zend_bool instanceof_function_ex(zend_class_entry *instance_ce, zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC); ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class_entry *ce TSRMLS_DC); +END_EXTERN_C() static inline zend_bool is_numeric_string(char *str, int length, long *lval, double *dval, zend_bool allow_errors) { @@ -169,10 +171,11 @@ return NULL; } + +BEGIN_EXTERN_C() ZEND_API int increment_function(zval *op1); ZEND_API int decrement_function(zval *op2); -BEGIN_EXTERN_C() ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC); ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC); ZEND_API void convert_to_long(zval *op); @@ -190,7 +193,6 @@ #define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC) ZEND_API double zend_string_to_double(const char *number, zend_uint length); -END_EXTERN_C() ZEND_API int zval_is_true(zval *op); ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); @@ -199,6 +201,7 @@ ZEND_API void zend_str_tolower(char *str, unsigned int length); ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned int length); +END_EXTERN_C() static inline char * zend_str_tolower_dup(const char *source, unsigned int length) @@ -206,6 +209,7 @@ return zend_str_tolower_copy((char *)emalloc(length+1), source, length); } +BEGIN_EXTERN_C() ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2); ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3); ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2); @@ -223,7 +227,7 @@ ZEND_API int zend_atoi(const char *str, int str_len); ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC); - +END_EXTERN_C() #define convert_to_ex_master(ppzv, lower_type, upper_type) \ if ((*ppzv)->type!=IS_##upper_type) { \ SEPARATE_ZVAL_IF_NOT_REF(ppzv); \ http://cvs.php.net/diff.php/ZendEngine2/zend_variables.h?r1=1.28&r2=1.29&ty=u Index: ZendEngine2/zend_variables.h diff -u ZendEngine2/zend_variables.h:1.28 ZendEngine2/zend_variables.h:1.29 --- ZendEngine2/zend_variables.h:1.28 Thu Jan 8 12:31:48 2004 +++ ZendEngine2/zend_variables.h Fri Feb 20 03:03:27 2004 @@ -17,15 +17,15 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_variables.h,v 1.28 2004/01/08 17:31:48 sniper Exp $ */ +/* $Id: zend_variables.h,v 1.29 2004/02/20 08:03:27 hholzgra Exp $ */ #ifndef ZEND_VARIABLES_H #define ZEND_VARIABLES_H -ZEND_API int zend_print_variable(zval *var); BEGIN_EXTERN_C() +ZEND_API int zend_print_variable(zval *var); ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC); ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC); ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC); @@ -56,11 +56,10 @@ #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor #endif -END_EXTERN_C() - - ZEND_API void zval_add_ref(zval **p); +END_EXTERN_C() + #define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper #define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper #define ZVAL_INTERNAL_DTOR (void (*)(void *)) zval_internal_dtor_wrapper