diff options
| author | Zeev Suraski <zeev@php.net> | 1999-05-28 12:06:59 +0000 |
|---|---|---|
| committer | Zeev Suraski <zeev@php.net> | 1999-05-28 12:06:59 +0000 |
| commit | 741b816136830af36a54fb9d4c92e4ac0a12ed57 (patch) | |
| tree | eee3631cab7e3ae12b56a4e1d5e0c799bd17dee6 /Zend/zend_API.h | |
| parent | 7a167cd0c1f6ee7c0dce0196b5ca9209a54f534c (diff) | |
| download | php-git-741b816136830af36a54fb9d4c92e4ac0a12ed57.tar.gz | |
* Support getThis() for internal functions.
* Fix 'new object or die' and AiCount issue thoroughly (earlier fix didn't
work with the optimizer).
* Add new macros for standardized definition of classes.
* Only report AiCount problems if shutdown was not silent.
Diffstat (limited to 'Zend/zend_API.h')
| -rw-r--r-- | Zend/zend_API.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h index e312e5b214..c1a3edb486 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -28,6 +28,28 @@ #define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, zend_if_##name, arg_types) +#define INIT_CLASS_ENTRY(class_container, class_name, functions) \ + { \ + class_container.name = strdup(class_name); \ + class_container.name_length = sizeof(class_name)-1; \ + class_container.builtin_functions = functions; \ + class_container.handle_function_call = NULL; \ + class_container.handle_property_get = NULL; \ + class_container.handle_property_set = NULL; \ + } + +#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \ + { \ + class_container.name = strdup(class_name); \ + class_container.name_length = sizeof(class_name)-1; \ + class_container.builtin_functions = functions; \ + class_container.handle_function_call = handle_fcall; \ + class_container.handle_property_get = handle_propget; \ + class_container.handle_property_set = handle_propset; \ + } + + + int zend_next_free_module(void); ZEND_API int getParameters(int ht, int param_count,...); @@ -35,17 +57,18 @@ ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array); ZEND_API int getParametersEx(int param_count,...); ZEND_API int getParametersArrayEx(int param_count, zval ***argument_array); -ZEND_API int getThis(zval **this_ptr); ZEND_API int ParameterPassedByReference(int ht, uint n); -int zend_register_functions(zend_function_entry *functions); -void zend_unregister_functions(zend_function_entry *functions, int count); +int zend_register_functions(zend_function_entry *functions, HashTable *function_table); +void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table); ZEND_API int zend_register_module(zend_module_entry *module_entry); ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry); ZEND_API zend_module_entry *zend_get_module(int module_number); ZEND_API void wrong_param_count(void); +#define getThis() (this_ptr) + #define WRONG_PARAM_COUNT { wrong_param_count(); return; } #define WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); return ret; } #define ARG_COUNT(ht) (ht) |
