diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6f727e1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +m4/** linguist-generated=true linguist-vendored=true diff --git a/.gitignore b/.gitignore index 3217671..56a1eaa 100644 --- a/.gitignore +++ b/.gitignore @@ -30,9 +30,13 @@ missing mkinstalldirs modules run-tests.php +gen_stub.php tests/*/*.diff tests/*/*.out tests/*/*.php tests/*/*.exp tests/*/*.log tests/*/*.sh + +# Used by gen_stub.php +PHP-Parser-* diff --git a/ChangeLog b/ChangeLog index 122134d..53a912a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ vips extension changelog +Version 1.0.13 (2022-2-xx) +-------------------------- + * php8 compatibility [kleisauke] + * improve module linking [kleisauke] + * improve packaging [kleisauke] + * add type hints [jcupitt, kleisauke] + Version 1.0.12 (2020-8-xx) -------------------------- * vips_image_set_type() can be passed a type name diff --git a/README.md b/README.md index 655bb34..6904080 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,16 @@ # Low-level PHP binding for libvips -This extension lets you use the libvips image processing library from PHP 7. It -is intentionally very low-level: modules such as -https://github.com/libvips/php-vips try to layer a nice API on top of this. +**This extension is deprecated** php-vips 2.0+ has switched to FFI for calls +into the libvips binary, so this extension is no longer necessary. It will not +be updated again (though it might still be useful if for some reason you don't +/ can't update to php-vips 2.0). + +This extension lets you use the libvips image processing library +from PHP 7 and PHP 8. + +This is not supposed to be used directly! Install this, then use +[php-vips 1.x](https://github.com/libvips/php-vips) to layer a nice (and +documented!) API on top of this extension. libvips is fast and needs little memory. The [`vips-php-bench`]( https://github.com/jcupitt/php-vips-bench) repository tests @@ -16,6 +24,7 @@ memory. #!/usr/bin/env php +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 8 + +AC_DEFUN([AX_APPEND_FLAG], +[dnl +AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF +AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) +AS_VAR_SET_IF(FLAGS,[ + AS_CASE([" AS_VAR_GET(FLAGS) "], + [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], + [ + AS_VAR_APPEND(FLAGS,[" $1"]) + AC_RUN_LOG([: FLAGS="$FLAGS"]) + ]) + ], + [ + AS_VAR_SET(FLAGS,[$1]) + AC_RUN_LOG([: FLAGS="$FLAGS"]) + ]) +AS_VAR_POPDEF([FLAGS])dnl +])dnl AX_APPEND_FLAG diff --git a/m4/ax_append_link_flags.m4 b/m4/ax_append_link_flags.m4 new file mode 100644 index 0000000..99b9fa5 --- /dev/null +++ b/m4/ax_append_link_flags.m4 @@ -0,0 +1,44 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# For every FLAG1, FLAG2 it is checked whether the linker works with the +# flag. If it does, the flag is added FLAGS-VARIABLE +# +# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is +# used. During the check the flag is always added to the linker's flags. +# +# If EXTRA-FLAGS is defined, it is added to the linker's default flags +# when the check is done. The check is thus made with the flags: "LDFLAGS +# EXTRA-FLAGS FLAG". This can for example be used to force the linker to +# issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG. +# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS. +# +# LICENSE +# +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_APPEND_LINK_FLAGS], +[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) +AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) +for flag in $1; do + AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4]) +done +])dnl AX_APPEND_LINK_FLAGS diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4 new file mode 100644 index 0000000..03a30ce --- /dev/null +++ b/m4/ax_check_link_flag.m4 @@ -0,0 +1,53 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the linker or gives an error. +# (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the linker's default flags +# when the check is done. The check is thus made with the flags: "LDFLAGS +# EXTRA-FLAGS FLAG". This can for example be used to force the linker to +# issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_LINK_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AC_DEFUN([AX_CHECK_LINK_FLAG], +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl +AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $4 $1" + AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + LDFLAGS=$ax_check_save_flags]) +AS_VAR_IF(CACHEVAR,yes, + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_LINK_FLAGS diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4 new file mode 100644 index 0000000..17c3eab --- /dev/null +++ b/m4/ax_require_defined.m4 @@ -0,0 +1,37 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_REQUIRE_DEFINED(MACRO) +# +# DESCRIPTION +# +# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have +# been defined and thus are available for use. This avoids random issues +# where a macro isn't expanded. Instead the configure script emits a +# non-fatal: +# +# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found +# +# It's like AC_REQUIRE except it doesn't expand the required macro. +# +# Here's an example: +# +# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) +# +# LICENSE +# +# Copyright (c) 2014 Mike Frysinger +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 2 + +AC_DEFUN([AX_REQUIRE_DEFINED], [dnl + m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) +])dnl AX_REQUIRE_DEFINED diff --git a/package.xml b/package.xml index f60055a..6910e94 100644 --- a/package.xml +++ b/package.xml @@ -15,9 +15,9 @@ http://pear.php.net/dtd/package-2.0.xsd"> jcupitt@php.net yes - 2020-08-29 + 2022-02-16 - 1.0.12 + 1.0.13 1.0.0 @@ -26,7 +26,10 @@ http://pear.php.net/dtd/package-2.0.xsd"> MIT - * vips_image_set_type() can be passed a type name + * php8 compatibility [kleisauke] + * improve module linking [kleisauke] + * improve packaging [kleisauke] + * add type hints [jcupitt, kleisauke] @@ -34,13 +37,22 @@ http://pear.php.net/dtd/package-2.0.xsd"> - + + + + + + + + + + @@ -101,6 +113,18 @@ http://pear.php.net/dtd/package-2.0.xsd"> + + stablestable + 1.0.131.0.0 + 2022-02-16 + + * php8 compatibility [kleisauke] + * improve module linking [kleisauke] + * improve packaging [kleisauke] + * add type hints [jcupitt, kleisauke] + + + stablestable 1.0.121.0.0 diff --git a/php_vips.h b/php_vips.h index a7f3eb0..7f55f2a 100644 --- a/php_vips.h +++ b/php_vips.h @@ -5,7 +5,7 @@ extern zend_module_entry vips_module_entry; #define phpext_vips_ptr &vips_module_entry -#define PHP_VIPS_VERSION "1.0.12" +#define PHP_VIPS_VERSION "1.0.13" #ifdef PHP_WIN32 # define PHP_VIPS_API __declspec(dllexport) diff --git a/vips-1.0.12.tgz b/vips-1.0.12.tgz index e915394..e7ed1c7 100644 Binary files a/vips-1.0.12.tgz and b/vips-1.0.12.tgz differ diff --git a/vips-1.0.13.tgz b/vips-1.0.13.tgz new file mode 100644 index 0000000..ad6695f Binary files /dev/null and b/vips-1.0.13.tgz differ diff --git a/vips.c b/vips.c index 3eace25..3048ce6 100644 --- a/vips.c +++ b/vips.c @@ -13,7 +13,6 @@ #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" -#include "SAPI.h" #include "php_vips.h" #include @@ -24,6 +23,44 @@ ZEND_DECLARE_MODULE_GLOBALS(vips) */ +/* backward compat macros */ + +#ifndef IS_VOID +# define IS_VOID 0 +#endif /* !defined(IS_VOID) */ + +#ifndef IS_MIXED +# define IS_MIXED 0 +#endif /* !defined(IS_MIXED) */ + +#ifndef ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX +# define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(name, return_reference, num_args, type) \ + ZEND_BEGIN_ARG_INFO_EX(name, 0, return_reference, num_args) +#endif /* !defined(ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX) */ + +#ifndef ZEND_ARG_TYPE_MASK +# define ZEND_ARG_TYPE_MASK(pass_by_ref, name, type_mask, default_value) \ + ZEND_ARG_TYPE_INFO(pass_by_ref, name, 0, 0) +#endif /* !defined(ZEND_ARG_TYPE_MASK) */ + +#ifndef ZEND_ARG_VARIADIC_TYPE_INFO +# define ZEND_ARG_VARIADIC_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) { #name, NULL, type_hint, pass_by_ref, allow_null, 1 }, +#endif /* !defined(ZEND_ARG_VARIADIC_TYPE_INFO) */ + +#ifndef ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE +# define ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, type_hint, allow_null, default_value) \ + ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) +#endif /* !defined(ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE) */ + +#if PHP_VERSION_ID < 70200 +# undef ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX +# define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, class_name, allow_null) \ + static const zend_internal_arg_info name[] = { \ + { (const char*)(zend_uintptr_t)(required_num_args), ( #class_name ), 0, return_reference, allow_null, 0 }, +#endif /* PHP_VERSION_ID < 70200 */ + +#include "vips_arginfo.h" + /* True global resources - no need for thread safety here */ static int le_gobject; @@ -1047,7 +1084,7 @@ vips_php_call_array(const char *operation_name, zval *instance, /* }}} */ -/* {{{ proto mixed vips_php_call(string operation_name, resource instance [, more]) +/* {{{ proto array|long vips_call(string operation_name, resource instance [, mixed args]) Call any vips operation */ PHP_FUNCTION(vips_call) @@ -1094,7 +1131,7 @@ PHP_FUNCTION(vips_call) } /* }}} */ -/* {{{ proto resource vips_image_new_from_file(string filename [, array options]) +/* {{{ proto array|long vips_image_new_from_file(string filename [, array options]) Open an image from a filename */ PHP_FUNCTION(vips_image_new_from_file) { @@ -1138,7 +1175,7 @@ PHP_FUNCTION(vips_image_new_from_file) } /* }}} */ -/* {{{ proto resource vips_image_new_from_buffer(string buffer [, string option_string, array options]) +/* {{{ proto array|long vips_image_new_from_buffer(string buffer [, string option_string, array options]) Open an image from a string */ PHP_FUNCTION(vips_image_new_from_buffer) { @@ -1237,7 +1274,7 @@ PHP_FUNCTION(vips_image_new_from_array) } /* }}} */ -/* {{{ proto resource vips_interpolate_new(string name]) +/* {{{ proto resource vips_interpolate_new(string name) make a new interpolator */ PHP_FUNCTION(vips_interpolate_new) { @@ -1260,7 +1297,7 @@ PHP_FUNCTION(vips_interpolate_new) } /* }}} */ -/* {{{ proto long vips_image_write_to_file(resource image, string filename [, array options]) +/* {{{ proto array|long vips_image_write_to_file(resource image, string filename [, array options]) Write an image to a filename */ PHP_FUNCTION(vips_image_write_to_file) { @@ -1311,7 +1348,7 @@ PHP_FUNCTION(vips_image_write_to_file) } /* }}} */ -/* {{{ proto string|long vips_image_write_to_buffer(resource image, string suffix [, array options]) +/* {{{ proto array|long vips_image_write_to_buffer(resource image, string suffix [, array options]) Write an image to a string */ PHP_FUNCTION(vips_image_write_to_buffer) { @@ -1354,7 +1391,7 @@ PHP_FUNCTION(vips_image_write_to_buffer) } /* }}} */ -/* {{{ proto resource vips_image_copy_memory(resource image) +/* {{{ proto array|long vips_image_copy_memory(resource image) Copy an image to a memory image */ PHP_FUNCTION(vips_image_copy_memory) { @@ -1388,7 +1425,7 @@ PHP_FUNCTION(vips_image_copy_memory) } /* }}} */ -/* {{{ proto resource vips_image_new_from_memory(string data, integer width, integer height, integer bands, string format) +/* {{{ proto array|long vips_image_new_from_memory(string memory, integer width, integer height, integer bands, string format) Wrap an image around a memory array. */ PHP_FUNCTION(vips_image_new_from_memory) { @@ -1431,7 +1468,7 @@ PHP_FUNCTION(vips_image_new_from_memory) } /* }}} */ -/* {{{ proto string vips_image_write_to_memory(resource image) +/* {{{ proto string|long vips_image_write_to_memory(resource image) Write an image to a memory array. */ PHP_FUNCTION(vips_image_write_to_memory) { @@ -1469,7 +1506,7 @@ PHP_FUNCTION(vips_image_write_to_memory) APPEND(return_value, p[i]); \ } -/* {{{ proto array vips_image_write_to_array(resource image) +/* {{{ proto array|long vips_image_write_to_array(resource image) Write an image to a PHP array. */ PHP_FUNCTION(vips_image_write_to_array) { @@ -1588,7 +1625,7 @@ PHP_FUNCTION(vips_foreign_find_load_buffer) } /* }}} */ -/* {{{ proto array vips_image_get(resource image, string field) +/* {{{ proto array|long vips_image_get(resource image, string field) Fetch field from image */ PHP_FUNCTION(vips_image_get) { @@ -1766,7 +1803,6 @@ PHP_FUNCTION(vips_type_from_name) { char *name; size_t name_len; - GType gtype; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { @@ -1936,7 +1972,7 @@ PHP_FUNCTION(vips_version) { char digits[256]; - vips_snprintf(digits, 256, "%d.%d.%d", vips_version(0), vips_version(1), vips_version(2)); + g_snprintf(digits, 256, "%d.%d.%d", vips_version(0), vips_version(1), vips_version(2)); RETVAL_STRING(digits); } @@ -2007,41 +2043,6 @@ static void php_free_gobject(zend_resource *rsrc) */ PHP_MINIT_FUNCTION(vips) { - if (strcmp(sapi_module.name, "apache2handler") == 0) { - /* "apachectl graceful" can cause us terrible problems. What happens: - * - * - the main apache process unloads this extension, vips.so - * - in turn, the C runtime will unload libvips.so, the vips library, - * since vips.so is the only thing that references it - * - libvips.so in turn uses glib.so, but this is often not unloaded, - * since other parts of apache can be using it (glib could also - * possibly be preventing unload itself, I'm not sure) - * - the main apache process then reloads vips.so, which in turn will - * reload libvips.so as it starts up - * - vips.so tries to init libvips.so - * - libvips.so tries to register its types (such as VipsImage) with - * glib.so, but finds the types from the previous init still there - * - everything breaks - * - * A simple fix that will always work is just to lock libvips in - * memory and prevent unload. We intentionally leak refs to the shared - * library. - * - * We include the binary API version number that this extension needs. - * We can't just load .so, that's only installed with libvips-dev, - * which may not be present at runtime. - */ -#ifdef VIPS_SONAME - if (!dlopen(VIPS_SONAME, RTLD_LAZY | RTLD_NODELETE)) -#else /*!VIPS_SONAME*/ - if (!dlopen("libvips.so.42", RTLD_LAZY | RTLD_NODELETE)) -#endif /*VIPS_SONAME*/ - { - sapi_module.sapi_error(E_WARNING, "php-vips-ext: unable to lock " - "libvips -- graceful may be unreliable"); - } - } - /* If you have INI entries, uncomment these lines REGISTER_INI_ENTRIES(); */ @@ -2117,37 +2118,37 @@ PHP_MINFO_FUNCTION(vips) php_info_print_table_start(); php_info_print_table_header(2, "vips property", "value"); - vips_snprintf(digits, 256, "%d.%d.%d", VIPS_MAJOR_VERSION, VIPS_MINOR_VERSION, VIPS_MICRO_VERSION); + g_snprintf(digits, 256, "%d.%d.%d", VIPS_MAJOR_VERSION, VIPS_MINOR_VERSION, VIPS_MICRO_VERSION); php_info_print_table_row(2, "Vips headers version", digits); - vips_snprintf(digits, 256, "%d.%d.%d", vips_version(0), vips_version(1), vips_version(2)); + g_snprintf(digits, 256, "%d.%d.%d", vips_version(0), vips_version(1), vips_version(2)); php_info_print_table_row(2, "Vips library version", digits); - vips_snprintf(digits, 256, "%d.%d.%d", vips_version(3), vips_version(4), vips_version(5)); + g_snprintf(digits, 256, "%d.%d.%d", vips_version(3), vips_version(4), vips_version(5)); php_info_print_table_row(2, "Vips ABI version", digits); - vips_snprintf(digits, 256, "%d", vips_version(0)); + g_snprintf(digits, 256, "%d", vips_version(0)); php_info_print_table_row(2, "Major version", digits); - vips_snprintf(digits, 256, "%d", vips_version(1)); + g_snprintf(digits, 256, "%d", vips_version(1)); php_info_print_table_row(2, "Minor version", digits); - vips_snprintf(digits, 256, "%d", vips_version(2)); + g_snprintf(digits, 256, "%d", vips_version(2)); php_info_print_table_row(2, "Micro version", digits); - vips_snprintf(digits, 256, "%zd", vips_cache_get_max_mem()); + g_snprintf(digits, 256, "%zd", vips_cache_get_max_mem()); php_info_print_table_row(2, "Cache max mem", digits); - vips_snprintf(digits, 256, "%d", vips_cache_get_max()); + g_snprintf(digits, 256, "%d", vips_cache_get_max()); php_info_print_table_row(2, "Cache max operations", digits); - vips_snprintf(digits, 256, "%d", vips_cache_get_size()); + g_snprintf(digits, 256, "%d", vips_cache_get_size()); php_info_print_table_row(2, "Cache current operations", digits); - vips_snprintf(digits, 256, "%d", vips_cache_get_max_files()); + g_snprintf(digits, 256, "%d", vips_cache_get_max_files()); php_info_print_table_row(2, "Cache max open files", digits); - vips_snprintf(digits, 256, "%d", vips_tracked_get_allocs()); + g_snprintf(digits, 256, "%d", vips_tracked_get_allocs()); php_info_print_table_row(2, "Memory allocations", digits); - vips_snprintf(digits, 256, "%zd", vips_tracked_get_mem()); + g_snprintf(digits, 256, "%zd", vips_tracked_get_mem()); php_info_print_table_row(2, "Memory currently allocated", digits); - vips_snprintf(digits, 256, "%zd", vips_tracked_get_mem_highwater()); + g_snprintf(digits, 256, "%zd", vips_tracked_get_mem_highwater()); php_info_print_table_row(2, "Memory high water", digits); - vips_snprintf(digits, 256, "%d", vips_concurrency_get()); + g_snprintf(digits, 256, "%d", vips_concurrency_get()); php_info_print_table_row(2, "Concurrency", digits); php_info_print_table_row(2, "SIMD support with liborc", @@ -2195,188 +2196,12 @@ PHP_MINFO_FUNCTION(vips) } /* }}} */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_new_from_file, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_ARRAY_INFO(0, options, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_new_from_buffer, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, buffer, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, option_string, IS_STRING, 0) - ZEND_ARG_ARRAY_INFO(0, options, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_new_from_array, 0, 0, 1) - ZEND_ARG_ARRAY_INFO(0, array, 0) - ZEND_ARG_TYPE_INFO(0, scale, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, offset, IS_DOUBLE, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_write_to_file, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) - ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_ARRAY_INFO(0, options, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_write_to_buffer, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) - ZEND_ARG_TYPE_INFO(0, suffix, IS_STRING, 0) - ZEND_ARG_ARRAY_INFO(0, options, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_copy_memory, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_new_from_memory, 0, 0, 5) - ZEND_ARG_TYPE_INFO(0, memory, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, bands, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_write_to_memory, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_write_to_array, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_foreign_find_load, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_interpolate_new, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_foreign_find_load_buffer, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, buffer, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_call, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, resource, IS_RESOURCE, 1) - ZEND_ARG_VARIADIC_INFO(0, vars) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_get, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) - ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_get_typeof, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) - ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_set, 0, 0, 3) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) - ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_type_from_name, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_set_type, 0, 0, 4) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) - ZEND_ARG_TYPE_MASK(0, type, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_remove, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, image, IS_RESOURCE, 0) - ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_vips_error_buffer, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_cache_set_max, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_cache_set_max_mem, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_cache_set_max_files, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_concurrency_set, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_vips_cache_get_max, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_vips_cache_get_max_mem, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_vips_cache_get_max_files, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_vips_cache_get_size, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_vips_concurrency_get, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_vips_version, 0) -ZEND_END_ARG_INFO() -/* {{{ vips_functions[] - * - * Every user visible function must have an entry in vips_functions[]. - */ -const zend_function_entry vips_functions[] = { - PHP_FE(vips_image_new_from_file, arginfo_vips_image_new_from_file) - PHP_FE(vips_image_new_from_buffer, arginfo_vips_image_new_from_buffer) - PHP_FE(vips_image_new_from_array, arginfo_vips_image_new_from_array) - PHP_FE(vips_image_write_to_file, arginfo_vips_image_write_to_file) - PHP_FE(vips_image_write_to_buffer, arginfo_vips_image_write_to_buffer) - PHP_FE(vips_image_copy_memory, arginfo_vips_image_copy_memory) - PHP_FE(vips_image_new_from_memory, arginfo_vips_image_new_from_memory) - PHP_FE(vips_image_write_to_memory, arginfo_vips_image_write_to_memory) - PHP_FE(vips_image_write_to_array, arginfo_vips_image_write_to_array) - PHP_FE(vips_foreign_find_load, arginfo_vips_foreign_find_load) - PHP_FE(vips_foreign_find_load_buffer, arginfo_vips_foreign_find_load_buffer) - PHP_FE(vips_interpolate_new, arginfo_vips_interpolate_new) - - PHP_FE(vips_call, arginfo_vips_call) - PHP_FE(vips_image_get, arginfo_vips_image_get) - PHP_FE(vips_image_get_typeof, arginfo_vips_image_get_typeof) - PHP_FE(vips_image_set, arginfo_vips_image_set) - PHP_FE(vips_type_from_name, arginfo_vips_type_from_name) - PHP_FE(vips_image_set_type, arginfo_vips_image_set_type) - PHP_FE(vips_image_remove, arginfo_vips_image_remove) - PHP_FE(vips_error_buffer, arginfo_vips_error_buffer) - PHP_FE(vips_cache_set_max, arginfo_vips_cache_set_max) - PHP_FE(vips_cache_set_max_mem, arginfo_vips_cache_set_max_mem) - PHP_FE(vips_cache_set_max_files, arginfo_vips_cache_set_max_files) - PHP_FE(vips_concurrency_set, arginfo_vips_concurrency_set) - PHP_FE(vips_cache_get_max, arginfo_vips_cache_get_max) - PHP_FE(vips_cache_get_max_mem, arginfo_vips_cache_get_max_mem) - PHP_FE(vips_cache_get_max_files, arginfo_vips_cache_get_max_files) - PHP_FE(vips_cache_get_size, arginfo_vips_cache_get_size) - PHP_FE(vips_concurrency_get, arginfo_vips_concurrency_get) - PHP_FE(vips_version, arginfo_vips_version) - - PHP_FE_END /* Must be the last line in vips_functions[] */ -}; -/* }}} */ - /* {{{ vips_module_entry */ zend_module_entry vips_module_entry = { STANDARD_MODULE_HEADER, "vips", - vips_functions, + ext_functions, PHP_MINIT(vips), PHP_MSHUTDOWN(vips), PHP_RINIT(vips), /* Replace with NULL if there's nothing to do at request start */ diff --git a/vips.stub.php b/vips.stub.php new file mode 100644 index 0000000..2638f0f --- /dev/null +++ b/vips.stub.php @@ -0,0 +1,117 @@ +|int + */ +function vips_image_new_from_file(string $filename, ?array $options = []): array|int {} + +/** + * @return array|int + */ +function vips_image_new_from_buffer(string $buffer, ?string $option_string = "", ?array $options = []): array|int {} + +/** + * @return resource + */ +function vips_image_new_from_array(array $array, ?float $scale = 1.0, ?float $offset = 0.0) {} + +/** + * @param resource $image + * @return array|int + */ +function vips_image_write_to_file($image, string $filename, ?array $options = []): array|int {} + +/** + * @param resource $image + * @return array|int + */ +function vips_image_write_to_buffer($image, string $suffix, ?array $options = []): array|int {} + +/** + * @param resource $image + * @return array|int + */ +function vips_image_copy_memory($image): array|int {} + +/** + * @return array|int + */ +function vips_image_new_from_memory(string $memory, int $width, int $height, int $bands, string $format): array|int {} + +/** + * @param resource $image + */ +function vips_image_write_to_memory($image): string|int {} + +/** + * @param resource $image + * @return array|int + */ +function vips_image_write_to_array($image): array|int {} + +function vips_foreign_find_load(string $filename): string|int {} + +function vips_foreign_find_load_buffer(string $buffer): string|int {} + +/** + * @return resource + */ +function vips_interpolate_new(string $name) {} + +/** + * @param resource $instance + * @return array|int + */ +function vips_call(string $operation_name, $instance, mixed ...$args): array|int {} + +/** + * @param resource $image + * @return array|int + */ +function vips_image_get($image, string $field): array|int {} + +/** + * @param resource $image + */ +function vips_image_get_typeof($image, string $field): int {} + +/** + * @param resource $image + */ +function vips_image_set($image, string $field, mixed $value): int {} + +function vips_type_from_name(string $name): int {} + +/** + * @param resource $image + */ +function vips_image_set_type($image, string|int $type, string $field, mixed $value): int {} + +/** + * @param resource $image + */ +function vips_image_remove($image, string $field): int {} + +function vips_error_buffer(): string {} + +function vips_cache_set_max(int $value): void {} + +function vips_cache_set_max_mem(int $value): void {} + +function vips_cache_set_max_files(int $value): void {} + +function vips_concurrency_set(int $value): void {} + +function vips_cache_get_max(): int {} + +function vips_cache_get_max_mem(): int {} + +function vips_cache_get_max_files(): int {} + +function vips_cache_get_size(): int {} + +function vips_concurrency_get(): int {} + +function vips_version(): string {} diff --git a/vips_arginfo.h b/vips_arginfo.h new file mode 100644 index 0000000..4d17580 --- /dev/null +++ b/vips_arginfo.h @@ -0,0 +1,189 @@ +/* This is a generated file, edit the .stub.php file instead. + * Stub hash: b0a895aa400527f647c2f9bd728c4e8a94cb0c9b */ + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_image_new_from_file, 0, 1, MAY_BE_ARRAY|MAY_BE_LONG) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "[]") +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_image_new_from_buffer, 0, 1, MAY_BE_ARRAY|MAY_BE_LONG) + ZEND_ARG_TYPE_INFO(0, buffer, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option_string, IS_STRING, 1, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "[]") +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_image_new_from_array, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_DOUBLE, 1, "1.0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_DOUBLE, 1, "0.0") +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_image_write_to_file, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG) + ZEND_ARG_INFO(0, image) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "[]") +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_image_write_to_buffer, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG) + ZEND_ARG_INFO(0, image) + ZEND_ARG_TYPE_INFO(0, suffix, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "[]") +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_image_copy_memory, 0, 1, MAY_BE_ARRAY|MAY_BE_LONG) + ZEND_ARG_INFO(0, image) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_image_new_from_memory, 0, 5, MAY_BE_ARRAY|MAY_BE_LONG) + ZEND_ARG_TYPE_INFO(0, memory, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, height, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, bands, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_image_write_to_memory, 0, 1, MAY_BE_STRING|MAY_BE_LONG) + ZEND_ARG_INFO(0, image) +ZEND_END_ARG_INFO() + +#define arginfo_vips_image_write_to_array arginfo_vips_image_copy_memory + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_foreign_find_load, 0, 1, MAY_BE_STRING|MAY_BE_LONG) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_foreign_find_load_buffer, 0, 1, MAY_BE_STRING|MAY_BE_LONG) + ZEND_ARG_TYPE_INFO(0, buffer, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_vips_interpolate_new, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_call, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG) + ZEND_ARG_TYPE_INFO(0, operation_name, IS_STRING, 0) + ZEND_ARG_INFO(0, instance) + ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_vips_image_get, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG) + ZEND_ARG_INFO(0, image) + ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vips_image_get_typeof, 0, 2, IS_LONG, 0) + ZEND_ARG_INFO(0, image) + ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vips_image_set, 0, 3, IS_LONG, 0) + ZEND_ARG_INFO(0, image) + ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vips_type_from_name, 0, 1, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vips_image_set_type, 0, 4, IS_LONG, 0) + ZEND_ARG_INFO(0, image) + ZEND_ARG_TYPE_MASK(0, type, MAY_BE_STRING|MAY_BE_LONG, NULL) + ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) +ZEND_END_ARG_INFO() + +#define arginfo_vips_image_remove arginfo_vips_image_get_typeof + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vips_error_buffer, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vips_cache_set_max, 0, 1, IS_VOID, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_vips_cache_set_max_mem arginfo_vips_cache_set_max + +#define arginfo_vips_cache_set_max_files arginfo_vips_cache_set_max + +#define arginfo_vips_concurrency_set arginfo_vips_cache_set_max + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vips_cache_get_max, 0, 0, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_vips_cache_get_max_mem arginfo_vips_cache_get_max + +#define arginfo_vips_cache_get_max_files arginfo_vips_cache_get_max + +#define arginfo_vips_cache_get_size arginfo_vips_cache_get_max + +#define arginfo_vips_concurrency_get arginfo_vips_cache_get_max + +#define arginfo_vips_version arginfo_vips_error_buffer + + +ZEND_FUNCTION(vips_image_new_from_file); +ZEND_FUNCTION(vips_image_new_from_buffer); +ZEND_FUNCTION(vips_image_new_from_array); +ZEND_FUNCTION(vips_image_write_to_file); +ZEND_FUNCTION(vips_image_write_to_buffer); +ZEND_FUNCTION(vips_image_copy_memory); +ZEND_FUNCTION(vips_image_new_from_memory); +ZEND_FUNCTION(vips_image_write_to_memory); +ZEND_FUNCTION(vips_image_write_to_array); +ZEND_FUNCTION(vips_foreign_find_load); +ZEND_FUNCTION(vips_foreign_find_load_buffer); +ZEND_FUNCTION(vips_interpolate_new); +ZEND_FUNCTION(vips_call); +ZEND_FUNCTION(vips_image_get); +ZEND_FUNCTION(vips_image_get_typeof); +ZEND_FUNCTION(vips_image_set); +ZEND_FUNCTION(vips_type_from_name); +ZEND_FUNCTION(vips_image_set_type); +ZEND_FUNCTION(vips_image_remove); +ZEND_FUNCTION(vips_error_buffer); +ZEND_FUNCTION(vips_cache_set_max); +ZEND_FUNCTION(vips_cache_set_max_mem); +ZEND_FUNCTION(vips_cache_set_max_files); +ZEND_FUNCTION(vips_concurrency_set); +ZEND_FUNCTION(vips_cache_get_max); +ZEND_FUNCTION(vips_cache_get_max_mem); +ZEND_FUNCTION(vips_cache_get_max_files); +ZEND_FUNCTION(vips_cache_get_size); +ZEND_FUNCTION(vips_concurrency_get); +ZEND_FUNCTION(vips_version); + + +static const zend_function_entry ext_functions[] = { + ZEND_FE(vips_image_new_from_file, arginfo_vips_image_new_from_file) + ZEND_FE(vips_image_new_from_buffer, arginfo_vips_image_new_from_buffer) + ZEND_FE(vips_image_new_from_array, arginfo_vips_image_new_from_array) + ZEND_FE(vips_image_write_to_file, arginfo_vips_image_write_to_file) + ZEND_FE(vips_image_write_to_buffer, arginfo_vips_image_write_to_buffer) + ZEND_FE(vips_image_copy_memory, arginfo_vips_image_copy_memory) + ZEND_FE(vips_image_new_from_memory, arginfo_vips_image_new_from_memory) + ZEND_FE(vips_image_write_to_memory, arginfo_vips_image_write_to_memory) + ZEND_FE(vips_image_write_to_array, arginfo_vips_image_write_to_array) + ZEND_FE(vips_foreign_find_load, arginfo_vips_foreign_find_load) + ZEND_FE(vips_foreign_find_load_buffer, arginfo_vips_foreign_find_load_buffer) + ZEND_FE(vips_interpolate_new, arginfo_vips_interpolate_new) + ZEND_FE(vips_call, arginfo_vips_call) + ZEND_FE(vips_image_get, arginfo_vips_image_get) + ZEND_FE(vips_image_get_typeof, arginfo_vips_image_get_typeof) + ZEND_FE(vips_image_set, arginfo_vips_image_set) + ZEND_FE(vips_type_from_name, arginfo_vips_type_from_name) + ZEND_FE(vips_image_set_type, arginfo_vips_image_set_type) + ZEND_FE(vips_image_remove, arginfo_vips_image_remove) + ZEND_FE(vips_error_buffer, arginfo_vips_error_buffer) + ZEND_FE(vips_cache_set_max, arginfo_vips_cache_set_max) + ZEND_FE(vips_cache_set_max_mem, arginfo_vips_cache_set_max_mem) + ZEND_FE(vips_cache_set_max_files, arginfo_vips_cache_set_max_files) + ZEND_FE(vips_concurrency_set, arginfo_vips_concurrency_set) + ZEND_FE(vips_cache_get_max, arginfo_vips_cache_get_max) + ZEND_FE(vips_cache_get_max_mem, arginfo_vips_cache_get_max_mem) + ZEND_FE(vips_cache_get_max_files, arginfo_vips_cache_get_max_files) + ZEND_FE(vips_cache_get_size, arginfo_vips_cache_get_size) + ZEND_FE(vips_concurrency_get, arginfo_vips_concurrency_get) + ZEND_FE(vips_version, arginfo_vips_version) + ZEND_FE_END +};