summaryrefslogtreecommitdiff
blob: c00f560f1fd8799aa808292255f2e105bc7fd169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
diff -up uuid-1.6.2/php/uuid.c.php54 uuid-1.6.2/php/uuid.c
--- uuid-1.6.2/php/uuid.c	2007-01-01 19:35:57.000000000 +0100
+++ uuid-1.6.2/php/uuid.c	2012-11-06 16:05:03.354913764 +0100
@@ -60,7 +60,7 @@ static int ctx_id;               /* inte
 #define ctx_name "UUID context"  /* external name   */
 
 /* module initialization */
-PHP_MINIT_FUNCTION(uuid)
+ZEND_MINIT_FUNCTION(uuid)
 {
     /* register resource identifier */
     ctx_id = zend_register_list_destructors_ex(
@@ -91,13 +91,13 @@ PHP_MINIT_FUNCTION(uuid)
 }
 
 /* module shutdown */
-PHP_MSHUTDOWN_FUNCTION(uuid)
+ZEND_MSHUTDOWN_FUNCTION(uuid)
 {
     return SUCCESS;
 }
 
 /* module information */
-PHP_MINFO_FUNCTION(uuid)
+ZEND_MINFO_FUNCTION(uuid)
 {
     char version[32];
 
@@ -115,7 +115,7 @@ PHP_MINFO_FUNCTION(uuid)
    proto rc uuid_create(ctx)
    $rc = uuid_create(&$uuid);
    create UUID context */
-PHP_FUNCTION(uuid_create)
+ZEND_FUNCTION(uuid_create)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -147,7 +147,7 @@ PHP_FUNCTION(uuid_create)
    proto rc uuid_destroy(ctx)
    $rc = uuid_destroy($uuid);
    destroy UUID context */
-PHP_FUNCTION(uuid_destroy)
+ZEND_FUNCTION(uuid_destroy)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -178,7 +178,7 @@ PHP_FUNCTION(uuid_destroy)
    proto rc uuid_clone(ctx, &ctx2)
    $rc = uuid_clone($uuid, &$uuid);
    clone UUID context */
-PHP_FUNCTION(uuid_clone)
+ZEND_FUNCTION(uuid_clone)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -217,7 +217,7 @@ PHP_FUNCTION(uuid_clone)
    proto rc uuid_load(ctx, name)
    $rc = uuid_name($uuid, $name);
    load an existing UUID */
-PHP_FUNCTION(uuid_load)
+ZEND_FUNCTION(uuid_load)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -249,7 +249,7 @@ PHP_FUNCTION(uuid_load)
    proto rc uuid_make(ctx, mode[, ..., ...])
    $rc = uuid_make($uuid, $mode[, ..., ...]);
    make a new UUID */
-PHP_FUNCTION(uuid_make)
+ZEND_FUNCTION(uuid_make)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -307,7 +307,7 @@ PHP_FUNCTION(uuid_make)
    proto rc uuid_isnil(ctx, result)
    $rc = uuid_isnil($uuid, &$result);
    compare UUID for being Nil UUID */
-PHP_FUNCTION(uuid_isnil)
+ZEND_FUNCTION(uuid_isnil)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -344,7 +344,7 @@ PHP_FUNCTION(uuid_isnil)
    proto rc uuid_compare(ctx, ctx2, result)
    $rc = uuid_compare($uuid, $uuid2, &$result);
    compare two UUIDs */
-PHP_FUNCTION(uuid_compare)
+ZEND_FUNCTION(uuid_compare)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -388,7 +388,7 @@ PHP_FUNCTION(uuid_compare)
    proto rc uuid_import(ctx, fmt, data)
    $rc = uuid_import($ctx, $fmt, $data);
    import UUID from variable */
-PHP_FUNCTION(uuid_import)
+ZEND_FUNCTION(uuid_import)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -424,7 +424,7 @@ PHP_FUNCTION(uuid_import)
    proto rc uuid_export(ctx, fmt, data)
    $rc = uuid_error($ctx, $fmt, &$data);
    export UUID into variable */
-PHP_FUNCTION(uuid_export)
+ZEND_FUNCTION(uuid_export)
 {
     zval *z_ctx;
     ctx_t *ctx;
@@ -472,7 +472,7 @@ PHP_FUNCTION(uuid_export)
    proto rc uuid_error(ctx)
    $error = uuid_error($rc);
    return error string corresponding to error return code */
-PHP_FUNCTION(uuid_error)
+ZEND_FUNCTION(uuid_error)
 {
     int z_rc;
     uuid_rc_t rc;
@@ -490,24 +490,79 @@ PHP_FUNCTION(uuid_error)
    proto int uuid_version()
    $version = uuid_version();
    return library version number */
-PHP_FUNCTION(uuid_version)
+ZEND_FUNCTION(uuid_version)
 {
     RETURN_LONG((long)uuid_version());
 }
 
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_create, 0)
+    ZEND_ARG_INFO(1, ctx)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_destroy, 0)
+    ZEND_ARG_INFO(0, ctx)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_clone, 0)
+    ZEND_ARG_INFO(0, ctx)
+    ZEND_ARG_INFO(1, ctx2)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_load, 0)
+    ZEND_ARG_INFO(0, ctx)
+    ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_uuid_make, 0, 0, 2)
+    ZEND_ARG_INFO(0, ctx)
+    ZEND_ARG_INFO(0, mode)
+    ZEND_ARG_INFO(0, ctxns)
+    ZEND_ARG_INFO(0, url)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_isnil, 0)
+    ZEND_ARG_INFO(0, ctx)
+    ZEND_ARG_INFO(1, result)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_compare, 0)
+    ZEND_ARG_INFO(0, ctx)
+    ZEND_ARG_INFO(0, ctx2)
+    ZEND_ARG_INFO(1, result)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_import, 0)
+    ZEND_ARG_INFO(0, ctx)
+    ZEND_ARG_INFO(0, fmt)
+    ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_export, 0)
+    ZEND_ARG_INFO(0, ctx)
+    ZEND_ARG_INFO(0, fmt)
+    ZEND_ARG_INFO(1, data)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_error, 0)
+    ZEND_ARG_INFO(0, ctx)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_uuid_version, 0)
+ZEND_END_ARG_INFO()
+
 /* module function table */
-static function_entry uuid_functions[] = {
-    PHP_FE(uuid_create,  NULL)
-    PHP_FE(uuid_destroy, NULL)
-    PHP_FE(uuid_clone,   NULL)
-    PHP_FE(uuid_load,    NULL)
-    PHP_FE(uuid_make,    NULL)
-    PHP_FE(uuid_isnil,   NULL)
-    PHP_FE(uuid_compare, NULL)
-    PHP_FE(uuid_import,  NULL)
-    PHP_FE(uuid_export,  NULL)
-    PHP_FE(uuid_error,   NULL)
-    PHP_FE(uuid_version, NULL)
+static zend_function_entry uuid_functions[] = {
+    ZEND_FE(uuid_create,  arginfo_uuid_create)
+    ZEND_FE(uuid_destroy, NULL)
+    ZEND_FE(uuid_clone,   arginfo_uuid_clone)
+    ZEND_FE(uuid_load,    NULL)
+    ZEND_FE(uuid_make,    NULL)
+    ZEND_FE(uuid_isnil,   arginfo_uuid_isnil)
+    ZEND_FE(uuid_compare, arginfo_uuid_compare)
+    ZEND_FE(uuid_import,  NULL)
+    ZEND_FE(uuid_export,  arginfo_uuid_export)
+    ZEND_FE(uuid_error,   NULL)
+    ZEND_FE(uuid_version, NULL)
     { NULL, NULL, NULL }
 };
 
@@ -516,11 +571,11 @@ zend_module_entry uuid_module_entry = {
     STANDARD_MODULE_HEADER,
     "uuid",
     uuid_functions,
-    PHP_MINIT(uuid),
-    PHP_MSHUTDOWN(uuid),
+    ZEND_MINIT(uuid),
+    ZEND_MSHUTDOWN(uuid),
     NULL,
     NULL,
-    PHP_MINFO(uuid),
+    ZEND_MINFO(uuid),
     NO_VERSION_YET,
     STANDARD_MODULE_PROPERTIES
 };