Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 93 lines (74 sloc) 4.249 kB
573b460 @andigutmans Zend Library
andigutmans authored
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
6 +----------------------------------------------------------------------+
7 | This source file is subject to the Zend license, that is bundled |
8 | with this package in the file LICENSE. If you did not receive a |
9 | copy of the Zend license, please mail us at zend@zend.com so we can |
10 | send you a copy immediately. |
11 +----------------------------------------------------------------------+
12 | Authors: Andi Gutmans <andi@zend.com> |
13 | Zeev Suraski <zeev@zend.com> |
14 +----------------------------------------------------------------------+
15 */
16
17 #ifndef _ZEND_API_H
18 #define _ZEND_API_H
19
20 #include "modules.h"
21 #include "zend_list.h"
22
23
24 int zend_next_free_module(void);
25
26 int getParameters(HashTable *ht, int param_count,...);
27 int getParametersArray(HashTable *ht, int param_count, zval **argument_array);
28 int getThis(zval **this);
29 int ParameterPassedByReference(HashTable *ht, uint n);
30 int register_functions(function_entry *functions);
31 void unregister_functions(function_entry *functions, int count);
32 int register_module(zend_module_entry *module_entry);
33 zend_class_entry *register_internal_class(zend_class_entry *class_entry);
34
35 ZEND_API void wrong_param_count(void);
36
37 #define WRONG_PARAM_COUNT { wrong_param_count(); return; }
38 #define WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); return ret; }
39 #define ARG_COUNT(ht) (ht->nNextFreeElement)
40
41 #define BYREF_NONE 0
42 #define BYREF_FORCE 1
43 #define BYREF_ALLOW 2
44
45 #if !MSVC5
46 #define DLEXPORT
47 #endif
48
49 int zend_startup_module(zend_module_entry *module);
50
51 ZEND_API int array_init(zval *arg);
52 ZEND_API int object_init(zval *arg);
53 ZEND_API int object_init_ex(zval *arg, zend_class_entry *ce);
54 ZEND_API int add_assoc_long(zval *arg, char *key, long n);
55 ZEND_API int add_assoc_double(zval *arg, char *key, double d);
56 ZEND_API int add_assoc_string(zval *arg, char *key, char *str, int duplicate);
57 ZEND_API int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
58 ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
59 ZEND_API int add_index_long(zval *arg, uint idx, long n);
60 ZEND_API int add_index_double(zval *arg, uint idx, double d);
61 ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
62 ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
63 ZEND_API int add_next_index_long(zval *arg, long n);
64 ZEND_API int add_next_index_double(zval *arg, double d);
65 ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
66 ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
67
68 ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
69 ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
70 ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
71 ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
72 ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, int duplicate);
73 ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
74
75 ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval *params[]);
76
77
78 ZEND_API int add_property_long(zval *arg, char *key, long l);
79 ZEND_API int add_property_double(zval *arg, char *key, double d);
80 ZEND_API int add_property_string(zval *arg, char *key, char *str, int duplicate);
81 ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
82
83 #define add_method(arg,key,method) add_assoc_function((arg),(key),(method))
84
85 #endif /* _ZEND_API_H */
86
87 /*
88 * Local variables:
89 * tab-width: 4
90 * c-basic-offset: 4
91 * End:
92 */
Something went wrong with that request. Please try again.