24
24
ZEND_DECLARE_MODULE_GLOBALS(vips)
25
25
*/
26
26
27
+ #include "vips_arginfo.h"
28
+
27
29
/* True global resources - no need for thread safety here */
28
30
static int le_gobject ;
29
31
@@ -1047,7 +1049,7 @@ vips_php_call_array(const char *operation_name, zval *instance,
1047
1049
1048
1050
/* }}} */
1049
1051
1050
- /* {{{ proto mixed vips_php_call (string operation_name, resource instance [, more ])
1052
+ /* {{{ proto array|long vips_call (string operation_name, resource instance [, mixed args ])
1051
1053
Call any vips operation */
1052
1054
1053
1055
PHP_FUNCTION (vips_call )
@@ -1094,7 +1096,7 @@ PHP_FUNCTION(vips_call)
1094
1096
}
1095
1097
/* }}} */
1096
1098
1097
- /* {{{ proto resource vips_image_new_from_file(string filename [, array options])
1099
+ /* {{{ proto array|long vips_image_new_from_file(string filename [, array options])
1098
1100
Open an image from a filename */
1099
1101
PHP_FUNCTION (vips_image_new_from_file )
1100
1102
{
@@ -1138,7 +1140,7 @@ PHP_FUNCTION(vips_image_new_from_file)
1138
1140
}
1139
1141
/* }}} */
1140
1142
1141
- /* {{{ proto resource vips_image_new_from_buffer(string buffer [, string option_string, array options])
1143
+ /* {{{ proto array|long vips_image_new_from_buffer(string buffer [, string option_string, array options])
1142
1144
Open an image from a string */
1143
1145
PHP_FUNCTION (vips_image_new_from_buffer )
1144
1146
{
@@ -1237,7 +1239,7 @@ PHP_FUNCTION(vips_image_new_from_array)
1237
1239
}
1238
1240
/* }}} */
1239
1241
1240
- /* {{{ proto resource vips_interpolate_new(string name] )
1242
+ /* {{{ proto resource vips_interpolate_new(string name)
1241
1243
make a new interpolator */
1242
1244
PHP_FUNCTION (vips_interpolate_new )
1243
1245
{
@@ -1260,7 +1262,7 @@ PHP_FUNCTION(vips_interpolate_new)
1260
1262
}
1261
1263
/* }}} */
1262
1264
1263
- /* {{{ proto long vips_image_write_to_file(resource image, string filename [, array options])
1265
+ /* {{{ proto array| long vips_image_write_to_file(resource image, string filename [, array options])
1264
1266
Write an image to a filename */
1265
1267
PHP_FUNCTION (vips_image_write_to_file )
1266
1268
{
@@ -1311,7 +1313,7 @@ PHP_FUNCTION(vips_image_write_to_file)
1311
1313
}
1312
1314
/* }}} */
1313
1315
1314
- /* {{{ proto string |long vips_image_write_to_buffer(resource image, string suffix [, array options])
1316
+ /* {{{ proto array |long vips_image_write_to_buffer(resource image, string suffix [, array options])
1315
1317
Write an image to a string */
1316
1318
PHP_FUNCTION (vips_image_write_to_buffer )
1317
1319
{
@@ -1354,7 +1356,7 @@ PHP_FUNCTION(vips_image_write_to_buffer)
1354
1356
}
1355
1357
/* }}} */
1356
1358
1357
- /* {{{ proto resource vips_image_copy_memory(resource image)
1359
+ /* {{{ proto array|long vips_image_copy_memory(resource image)
1358
1360
Copy an image to a memory image */
1359
1361
PHP_FUNCTION (vips_image_copy_memory )
1360
1362
{
@@ -1388,7 +1390,7 @@ PHP_FUNCTION(vips_image_copy_memory)
1388
1390
}
1389
1391
/* }}} */
1390
1392
1391
- /* {{{ proto resource vips_image_new_from_memory(string data , integer width, integer height, integer bands, string format)
1393
+ /* {{{ proto array|long vips_image_new_from_memory(string memory , integer width, integer height, integer bands, string format)
1392
1394
Wrap an image around a memory array. */
1393
1395
PHP_FUNCTION (vips_image_new_from_memory )
1394
1396
{
@@ -1431,7 +1433,7 @@ PHP_FUNCTION(vips_image_new_from_memory)
1431
1433
}
1432
1434
/* }}} */
1433
1435
1434
- /* {{{ proto string vips_image_write_to_memory(resource image)
1436
+ /* {{{ proto string|long vips_image_write_to_memory(resource image)
1435
1437
Write an image to a memory array. */
1436
1438
PHP_FUNCTION (vips_image_write_to_memory )
1437
1439
{
@@ -1469,7 +1471,7 @@ PHP_FUNCTION(vips_image_write_to_memory)
1469
1471
APPEND(return_value, p[i]); \
1470
1472
}
1471
1473
1472
- /* {{{ proto array vips_image_write_to_array(resource image)
1474
+ /* {{{ proto array|long vips_image_write_to_array(resource image)
1473
1475
Write an image to a PHP array. */
1474
1476
PHP_FUNCTION (vips_image_write_to_array )
1475
1477
{
@@ -1588,7 +1590,7 @@ PHP_FUNCTION(vips_foreign_find_load_buffer)
1588
1590
}
1589
1591
/* }}} */
1590
1592
1591
- /* {{{ proto array vips_image_get(resource image, string field)
1593
+ /* {{{ proto array|long vips_image_get(resource image, string field)
1592
1594
Fetch field from image */
1593
1595
PHP_FUNCTION (vips_image_get )
1594
1596
{
@@ -2195,188 +2197,12 @@ PHP_MINFO_FUNCTION(vips)
2195
2197
}
2196
2198
/* }}} */
2197
2199
2198
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_new_from_file , 0 , 0 , 1 )
2199
- ZEND_ARG_TYPE_INFO (0 , filename , IS_STRING , 0 )
2200
- ZEND_ARG_ARRAY_INFO (0 , options , 0 )
2201
- ZEND_END_ARG_INFO ()
2202
-
2203
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_new_from_buffer , 0 , 0 , 1 )
2204
- ZEND_ARG_TYPE_INFO (0 , buffer , IS_STRING , 0 )
2205
- ZEND_ARG_TYPE_INFO (0 , option_string , IS_STRING , 0 )
2206
- ZEND_ARG_ARRAY_INFO (0 , options , 0 )
2207
- ZEND_END_ARG_INFO ()
2208
-
2209
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_new_from_array , 0 , 0 , 1 )
2210
- ZEND_ARG_ARRAY_INFO (0 , array , 0 )
2211
- ZEND_ARG_TYPE_INFO (0 , scale , IS_DOUBLE , 0 )
2212
- ZEND_ARG_TYPE_INFO (0 , offset , IS_DOUBLE , 0 )
2213
- ZEND_END_ARG_INFO ()
2214
-
2215
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_write_to_file , 0 , 0 , 1 )
2216
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2217
- ZEND_ARG_TYPE_INFO (0 , filename , IS_STRING , 0 )
2218
- ZEND_ARG_ARRAY_INFO (0 , options , 0 )
2219
- ZEND_END_ARG_INFO ()
2220
-
2221
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_write_to_buffer , 0 , 0 , 2 )
2222
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2223
- ZEND_ARG_TYPE_INFO (0 , suffix , IS_STRING , 0 )
2224
- ZEND_ARG_ARRAY_INFO (0 , options , 0 )
2225
- ZEND_END_ARG_INFO ()
2226
-
2227
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_copy_memory , 0 , 0 , 1 )
2228
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2229
- ZEND_END_ARG_INFO ()
2230
-
2231
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_new_from_memory , 0 , 0 , 5 )
2232
- ZEND_ARG_TYPE_INFO (0 , memory , IS_STRING , 0 )
2233
- ZEND_ARG_TYPE_INFO (0 , width , IS_LONG , 0 )
2234
- ZEND_ARG_TYPE_INFO (0 , height , IS_LONG , 0 )
2235
- ZEND_ARG_TYPE_INFO (0 , bands , IS_LONG , 0 )
2236
- ZEND_ARG_TYPE_INFO (0 , format , IS_STRING , 0 )
2237
- ZEND_END_ARG_INFO ()
2238
-
2239
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_write_to_memory , 0 , 0 , 1 )
2240
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2241
- ZEND_END_ARG_INFO ()
2242
-
2243
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_write_to_array , 0 , 0 , 1 )
2244
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2245
- ZEND_END_ARG_INFO ()
2246
-
2247
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_foreign_find_load , 0 , 0 , 1 )
2248
- ZEND_ARG_TYPE_INFO (0 , filename , IS_STRING , 0 )
2249
- ZEND_END_ARG_INFO ()
2250
-
2251
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_interpolate_new , 0 , 0 , 1 )
2252
- ZEND_ARG_TYPE_INFO (0 , name , IS_STRING , 0 )
2253
- ZEND_END_ARG_INFO ()
2254
-
2255
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_foreign_find_load_buffer , 0 , 0 , 1 )
2256
- ZEND_ARG_TYPE_INFO (0 , buffer , IS_STRING , 0 )
2257
- ZEND_END_ARG_INFO ()
2258
-
2259
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_call , 0 , 0 , 2 )
2260
- ZEND_ARG_TYPE_INFO (0 , name , IS_STRING , 0 )
2261
- ZEND_ARG_TYPE_INFO (0 , resource , IS_RESOURCE , 1 )
2262
- ZEND_ARG_VARIADIC_INFO (0 , vars )
2263
- ZEND_END_ARG_INFO ()
2264
-
2265
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_get , 0 , 0 , 2 )
2266
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2267
- ZEND_ARG_TYPE_INFO (0 , field , IS_STRING , 0 )
2268
- ZEND_END_ARG_INFO ()
2269
-
2270
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_get_typeof , 0 , 0 , 2 )
2271
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2272
- ZEND_ARG_TYPE_INFO (0 , field , IS_STRING , 0 )
2273
- ZEND_END_ARG_INFO ()
2274
-
2275
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_set , 0 , 0 , 3 )
2276
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2277
- ZEND_ARG_TYPE_INFO (0 , field , IS_STRING , 0 )
2278
- ZEND_ARG_INFO (0 , value )
2279
- ZEND_END_ARG_INFO ()
2280
-
2281
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_type_from_name , 0 , 0 , 1 )
2282
- ZEND_ARG_TYPE_INFO (0 , field , IS_STRING , 0 )
2283
- ZEND_END_ARG_INFO ()
2284
-
2285
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_set_type , 0 , 0 , 4 )
2286
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2287
- ZEND_ARG_TYPE_MASK (0 , type , MAY_BE_LONG |MAY_BE_STRING , NULL )
2288
- ZEND_ARG_TYPE_INFO (0 , field , IS_STRING , 0 )
2289
- ZEND_ARG_INFO (0 , value )
2290
- ZEND_END_ARG_INFO ()
2291
-
2292
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_image_remove , 0 , 0 , 2 )
2293
- ZEND_ARG_TYPE_INFO (0 , image , IS_RESOURCE , 0 )
2294
- ZEND_ARG_TYPE_INFO (0 , field , IS_STRING , 0 )
2295
- ZEND_END_ARG_INFO ()
2296
-
2297
- ZEND_BEGIN_ARG_INFO (arginfo_vips_error_buffer , 0 )
2298
- ZEND_END_ARG_INFO ()
2299
-
2300
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_cache_set_max , 0 , 0 , 1 )
2301
- ZEND_ARG_TYPE_INFO (0 , value , IS_LONG , 0 )
2302
- ZEND_END_ARG_INFO ()
2303
-
2304
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_cache_set_max_mem , 0 , 0 , 1 )
2305
- ZEND_ARG_TYPE_INFO (0 , value , IS_LONG , 0 )
2306
- ZEND_END_ARG_INFO ()
2307
-
2308
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_cache_set_max_files , 0 , 0 , 1 )
2309
- ZEND_ARG_TYPE_INFO (0 , value , IS_LONG , 0 )
2310
- ZEND_END_ARG_INFO ()
2311
-
2312
- ZEND_BEGIN_ARG_INFO_EX (arginfo_vips_concurrency_set , 0 , 0 , 1 )
2313
- ZEND_ARG_TYPE_INFO (0 , value , IS_LONG , 0 )
2314
- ZEND_END_ARG_INFO ()
2315
-
2316
- ZEND_BEGIN_ARG_INFO (arginfo_vips_cache_get_max , 0 )
2317
- ZEND_END_ARG_INFO ()
2318
-
2319
- ZEND_BEGIN_ARG_INFO (arginfo_vips_cache_get_max_mem , 0 )
2320
- ZEND_END_ARG_INFO ()
2321
-
2322
- ZEND_BEGIN_ARG_INFO (arginfo_vips_cache_get_max_files , 0 )
2323
- ZEND_END_ARG_INFO ()
2324
-
2325
- ZEND_BEGIN_ARG_INFO (arginfo_vips_cache_get_size , 0 )
2326
- ZEND_END_ARG_INFO ()
2327
-
2328
- ZEND_BEGIN_ARG_INFO (arginfo_vips_concurrency_get , 0 )
2329
- ZEND_END_ARG_INFO ()
2330
-
2331
- ZEND_BEGIN_ARG_INFO (arginfo_vips_version , 0 )
2332
- ZEND_END_ARG_INFO ()
2333
- /* {{{ vips_functions[]
2334
- *
2335
- * Every user visible function must have an entry in vips_functions[].
2336
- */
2337
- const zend_function_entry vips_functions [] = {
2338
- PHP_FE (vips_image_new_from_file , arginfo_vips_image_new_from_file )
2339
- PHP_FE (vips_image_new_from_buffer , arginfo_vips_image_new_from_buffer )
2340
- PHP_FE (vips_image_new_from_array , arginfo_vips_image_new_from_array )
2341
- PHP_FE (vips_image_write_to_file , arginfo_vips_image_write_to_file )
2342
- PHP_FE (vips_image_write_to_buffer , arginfo_vips_image_write_to_buffer )
2343
- PHP_FE (vips_image_copy_memory , arginfo_vips_image_copy_memory )
2344
- PHP_FE (vips_image_new_from_memory , arginfo_vips_image_new_from_memory )
2345
- PHP_FE (vips_image_write_to_memory , arginfo_vips_image_write_to_memory )
2346
- PHP_FE (vips_image_write_to_array , arginfo_vips_image_write_to_array )
2347
- PHP_FE (vips_foreign_find_load , arginfo_vips_foreign_find_load )
2348
- PHP_FE (vips_foreign_find_load_buffer , arginfo_vips_foreign_find_load_buffer )
2349
- PHP_FE (vips_interpolate_new , arginfo_vips_interpolate_new )
2350
-
2351
- PHP_FE (vips_call , arginfo_vips_call )
2352
- PHP_FE (vips_image_get , arginfo_vips_image_get )
2353
- PHP_FE (vips_image_get_typeof , arginfo_vips_image_get_typeof )
2354
- PHP_FE (vips_image_set , arginfo_vips_image_set )
2355
- PHP_FE (vips_type_from_name , arginfo_vips_type_from_name )
2356
- PHP_FE (vips_image_set_type , arginfo_vips_image_set_type )
2357
- PHP_FE (vips_image_remove , arginfo_vips_image_remove )
2358
- PHP_FE (vips_error_buffer , arginfo_vips_error_buffer )
2359
- PHP_FE (vips_cache_set_max , arginfo_vips_cache_set_max )
2360
- PHP_FE (vips_cache_set_max_mem , arginfo_vips_cache_set_max_mem )
2361
- PHP_FE (vips_cache_set_max_files , arginfo_vips_cache_set_max_files )
2362
- PHP_FE (vips_concurrency_set , arginfo_vips_concurrency_set )
2363
- PHP_FE (vips_cache_get_max , arginfo_vips_cache_get_max )
2364
- PHP_FE (vips_cache_get_max_mem , arginfo_vips_cache_get_max_mem )
2365
- PHP_FE (vips_cache_get_max_files , arginfo_vips_cache_get_max_files )
2366
- PHP_FE (vips_cache_get_size , arginfo_vips_cache_get_size )
2367
- PHP_FE (vips_concurrency_get , arginfo_vips_concurrency_get )
2368
- PHP_FE (vips_version , arginfo_vips_version )
2369
-
2370
- PHP_FE_END /* Must be the last line in vips_functions[] */
2371
- };
2372
- /* }}} */
2373
-
2374
2200
/* {{{ vips_module_entry
2375
2201
*/
2376
2202
zend_module_entry vips_module_entry = {
2377
2203
STANDARD_MODULE_HEADER ,
2378
2204
"vips" ,
2379
- vips_functions ,
2205
+ ext_functions ,
2380
2206
PHP_MINIT (vips ),
2381
2207
PHP_MSHUTDOWN (vips ),
2382
2208
PHP_RINIT (vips ), /* Replace with NULL if there's nothing to do at request start */
0 commit comments