mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Generate function entries for another batch of extensions
Closes GH-5352
This commit is contained in:
@@ -61,14 +61,6 @@ static HashTable php_libxml_exports;
|
||||
static ZEND_DECLARE_MODULE_GLOBALS(libxml)
|
||||
static PHP_GINIT_FUNCTION(libxml);
|
||||
|
||||
static PHP_FUNCTION(libxml_set_streams_context);
|
||||
static PHP_FUNCTION(libxml_use_internal_errors);
|
||||
static PHP_FUNCTION(libxml_get_last_error);
|
||||
static PHP_FUNCTION(libxml_clear_errors);
|
||||
static PHP_FUNCTION(libxml_get_errors);
|
||||
static PHP_FUNCTION(libxml_set_external_entity_loader);
|
||||
static PHP_FUNCTION(libxml_disable_entity_loader);
|
||||
|
||||
static zend_class_entry *libxmlerror_class_entry;
|
||||
|
||||
/* {{{ dynamically loadable module stuff */
|
||||
@@ -90,22 +82,10 @@ static int php_libxml_post_deactivate(void);
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ extension definition structures */
|
||||
static const zend_function_entry libxml_functions[] = {
|
||||
PHP_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context)
|
||||
PHP_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors)
|
||||
PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error)
|
||||
PHP_FE(libxml_clear_errors, arginfo_libxml_clear_errors)
|
||||
PHP_FE(libxml_get_errors, arginfo_libxml_get_errors)
|
||||
PHP_FE(libxml_disable_entity_loader, arginfo_libxml_disable_entity_loader)
|
||||
PHP_FE(libxml_set_external_entity_loader, arginfo_libxml_set_external_entity_loader)
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
zend_module_entry libxml_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"libxml", /* extension name */
|
||||
libxml_functions, /* extension function list */
|
||||
ext_functions, /* extension function list */
|
||||
PHP_MINIT(libxml), /* extension-wide startup function */
|
||||
PHP_MSHUTDOWN(libxml), /* extension-wide shutdown function */
|
||||
PHP_RINIT(libxml), /* per-request startup function */
|
||||
@@ -913,7 +893,7 @@ static PHP_MINFO_FUNCTION(libxml)
|
||||
|
||||
/* {{{ proto void libxml_set_streams_context(resource streams_context)
|
||||
Set the streams context for the next libxml document load or write */
|
||||
static PHP_FUNCTION(libxml_set_streams_context)
|
||||
PHP_FUNCTION(libxml_set_streams_context)
|
||||
{
|
||||
zval *arg;
|
||||
|
||||
@@ -931,7 +911,7 @@ static PHP_FUNCTION(libxml_set_streams_context)
|
||||
|
||||
/* {{{ proto bool libxml_use_internal_errors([boolean use_errors])
|
||||
Disable libxml errors and allow user to fetch error information as needed */
|
||||
static PHP_FUNCTION(libxml_use_internal_errors)
|
||||
PHP_FUNCTION(libxml_use_internal_errors)
|
||||
{
|
||||
xmlStructuredErrorFunc current_handler;
|
||||
zend_bool use_errors=0, retval;
|
||||
@@ -972,7 +952,7 @@ static PHP_FUNCTION(libxml_use_internal_errors)
|
||||
|
||||
/* {{{ proto object libxml_get_last_error()
|
||||
Retrieve last error from libxml */
|
||||
static PHP_FUNCTION(libxml_get_last_error)
|
||||
PHP_FUNCTION(libxml_get_last_error)
|
||||
{
|
||||
xmlErrorPtr error;
|
||||
|
||||
@@ -1004,7 +984,7 @@ static PHP_FUNCTION(libxml_get_last_error)
|
||||
|
||||
/* {{{ proto object libxml_get_errors()
|
||||
Retrieve array of errors */
|
||||
static PHP_FUNCTION(libxml_get_errors)
|
||||
PHP_FUNCTION(libxml_get_errors)
|
||||
{
|
||||
|
||||
xmlErrorPtr error;
|
||||
@@ -1046,7 +1026,7 @@ static PHP_FUNCTION(libxml_get_errors)
|
||||
|
||||
/* {{{ proto void libxml_clear_errors()
|
||||
Clear last error from libxml */
|
||||
static PHP_FUNCTION(libxml_clear_errors)
|
||||
PHP_FUNCTION(libxml_clear_errors)
|
||||
{
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
@@ -1067,7 +1047,7 @@ PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable) /*
|
||||
|
||||
/* {{{ proto bool libxml_disable_entity_loader([boolean disable])
|
||||
Disable/Enable ability to load external entities */
|
||||
static PHP_FUNCTION(libxml_disable_entity_loader)
|
||||
PHP_FUNCTION(libxml_disable_entity_loader)
|
||||
{
|
||||
zend_bool disable = 1;
|
||||
|
||||
@@ -1082,7 +1062,7 @@ static PHP_FUNCTION(libxml_disable_entity_loader)
|
||||
|
||||
/* {{{ proto void libxml_set_external_entity_loader(callback resolver_function)
|
||||
Changes the default external entity loader */
|
||||
static PHP_FUNCTION(libxml_set_external_entity_loader)
|
||||
PHP_FUNCTION(libxml_set_external_entity_loader)
|
||||
{
|
||||
zend_fcall_info fci;
|
||||
zend_fcall_info_cache fcc;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
/** @param resource $context */
|
||||
function libxml_set_streams_context($context): void {}
|
||||
|
||||
|
||||
@@ -24,3 +24,24 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_set_external_entity_loader, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, resolver_function, IS_CALLABLE, 1)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(libxml_set_streams_context);
|
||||
ZEND_FUNCTION(libxml_use_internal_errors);
|
||||
ZEND_FUNCTION(libxml_get_last_error);
|
||||
ZEND_FUNCTION(libxml_get_errors);
|
||||
ZEND_FUNCTION(libxml_clear_errors);
|
||||
ZEND_FUNCTION(libxml_disable_entity_loader);
|
||||
ZEND_FUNCTION(libxml_set_external_entity_loader);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context)
|
||||
ZEND_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors)
|
||||
ZEND_FE(libxml_get_last_error, arginfo_libxml_get_last_error)
|
||||
ZEND_FE(libxml_get_errors, arginfo_libxml_get_errors)
|
||||
ZEND_FE(libxml_clear_errors, arginfo_libxml_clear_errors)
|
||||
ZEND_FE(libxml_disable_entity_loader, arginfo_libxml_disable_entity_loader)
|
||||
ZEND_FE(libxml_set_external_entity_loader, arginfo_libxml_set_external_entity_loader)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -182,63 +182,11 @@ static const php_mb_nls_ident_list php_mb_default_identify_list[] = {
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ zend_function_entry mbstring_functions[] */
|
||||
static const zend_function_entry mbstring_functions[] = {
|
||||
PHP_FE(mb_convert_case, arginfo_mb_convert_case)
|
||||
PHP_FE(mb_strtoupper, arginfo_mb_strtoupper)
|
||||
PHP_FE(mb_strtolower, arginfo_mb_strtolower)
|
||||
PHP_FE(mb_language, arginfo_mb_language)
|
||||
PHP_FE(mb_internal_encoding, arginfo_mb_internal_encoding)
|
||||
PHP_FE(mb_http_input, arginfo_mb_http_input)
|
||||
PHP_FE(mb_http_output, arginfo_mb_http_output)
|
||||
PHP_FE(mb_detect_order, arginfo_mb_detect_order)
|
||||
PHP_FE(mb_substitute_character, arginfo_mb_substitute_character)
|
||||
PHP_FE(mb_parse_str, arginfo_mb_parse_str)
|
||||
PHP_FE(mb_output_handler, arginfo_mb_output_handler)
|
||||
PHP_FE(mb_preferred_mime_name, arginfo_mb_preferred_mime_name)
|
||||
PHP_FE(mb_str_split, arginfo_mb_str_split)
|
||||
PHP_FE(mb_strlen, arginfo_mb_strlen)
|
||||
PHP_FE(mb_strpos, arginfo_mb_strpos)
|
||||
PHP_FE(mb_strrpos, arginfo_mb_strrpos)
|
||||
PHP_FE(mb_stripos, arginfo_mb_stripos)
|
||||
PHP_FE(mb_strripos, arginfo_mb_strripos)
|
||||
PHP_FE(mb_strstr, arginfo_mb_strstr)
|
||||
PHP_FE(mb_strrchr, arginfo_mb_strrchr)
|
||||
PHP_FE(mb_stristr, arginfo_mb_stristr)
|
||||
PHP_FE(mb_strrichr, arginfo_mb_strrichr)
|
||||
PHP_FE(mb_substr_count, arginfo_mb_substr_count)
|
||||
PHP_FE(mb_substr, arginfo_mb_substr)
|
||||
PHP_FE(mb_strcut, arginfo_mb_strcut)
|
||||
PHP_FE(mb_strwidth, arginfo_mb_strwidth)
|
||||
PHP_FE(mb_strimwidth, arginfo_mb_strimwidth)
|
||||
PHP_FE(mb_convert_encoding, arginfo_mb_convert_encoding)
|
||||
PHP_FE(mb_detect_encoding, arginfo_mb_detect_encoding)
|
||||
PHP_FE(mb_list_encodings, arginfo_mb_list_encodings)
|
||||
PHP_FE(mb_encoding_aliases, arginfo_mb_encoding_aliases)
|
||||
PHP_FE(mb_convert_kana, arginfo_mb_convert_kana)
|
||||
PHP_FE(mb_encode_mimeheader, arginfo_mb_encode_mimeheader)
|
||||
PHP_FE(mb_decode_mimeheader, arginfo_mb_decode_mimeheader)
|
||||
PHP_FE(mb_convert_variables, arginfo_mb_convert_variables)
|
||||
PHP_FE(mb_encode_numericentity, arginfo_mb_encode_numericentity)
|
||||
PHP_FE(mb_decode_numericentity, arginfo_mb_decode_numericentity)
|
||||
PHP_FE(mb_send_mail, arginfo_mb_send_mail)
|
||||
PHP_FE(mb_get_info, arginfo_mb_get_info)
|
||||
PHP_FE(mb_check_encoding, arginfo_mb_check_encoding)
|
||||
PHP_FE(mb_ord, arginfo_mb_ord)
|
||||
PHP_FE(mb_chr, arginfo_mb_chr)
|
||||
PHP_FE(mb_scrub, arginfo_mb_scrub)
|
||||
#if HAVE_MBREGEX
|
||||
PHP_MBREGEX_FUNCTION_ENTRIES
|
||||
#endif
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ zend_module_entry mbstring_module_entry */
|
||||
zend_module_entry mbstring_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"mbstring",
|
||||
mbstring_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(mbstring),
|
||||
PHP_MSHUTDOWN(mbstring),
|
||||
PHP_RINIT(mbstring),
|
||||
|
||||
@@ -61,54 +61,6 @@ PHP_RINIT_FUNCTION(mbstring);
|
||||
PHP_RSHUTDOWN_FUNCTION(mbstring);
|
||||
PHP_MINFO_FUNCTION(mbstring);
|
||||
|
||||
/* functions in php_unicode.c */
|
||||
PHP_FUNCTION(mb_convert_case);
|
||||
PHP_FUNCTION(mb_strtoupper);
|
||||
PHP_FUNCTION(mb_strtolower);
|
||||
|
||||
/* php function registration */
|
||||
PHP_FUNCTION(mb_language);
|
||||
PHP_FUNCTION(mb_internal_encoding);
|
||||
PHP_FUNCTION(mb_http_input);
|
||||
PHP_FUNCTION(mb_http_output);
|
||||
PHP_FUNCTION(mb_detect_order);
|
||||
PHP_FUNCTION(mb_substitute_character);
|
||||
PHP_FUNCTION(mb_preferred_mime_name);
|
||||
PHP_FUNCTION(mb_parse_str);
|
||||
PHP_FUNCTION(mb_output_handler);
|
||||
PHP_FUNCTION(mb_str_split);
|
||||
PHP_FUNCTION(mb_strlen);
|
||||
PHP_FUNCTION(mb_strpos);
|
||||
PHP_FUNCTION(mb_strrpos);
|
||||
PHP_FUNCTION(mb_stripos);
|
||||
PHP_FUNCTION(mb_strripos);
|
||||
PHP_FUNCTION(mb_strstr);
|
||||
PHP_FUNCTION(mb_strrchr);
|
||||
PHP_FUNCTION(mb_stristr);
|
||||
PHP_FUNCTION(mb_strrichr);
|
||||
PHP_FUNCTION(mb_substr_count);
|
||||
PHP_FUNCTION(mb_substr);
|
||||
PHP_FUNCTION(mb_strcut);
|
||||
PHP_FUNCTION(mb_strwidth);
|
||||
PHP_FUNCTION(mb_strimwidth);
|
||||
PHP_FUNCTION(mb_convert_encoding);
|
||||
PHP_FUNCTION(mb_detect_encoding);
|
||||
PHP_FUNCTION(mb_list_encodings);
|
||||
PHP_FUNCTION(mb_encoding_aliases);
|
||||
PHP_FUNCTION(mb_convert_kana);
|
||||
PHP_FUNCTION(mb_encode_mimeheader);
|
||||
PHP_FUNCTION(mb_decode_mimeheader);
|
||||
PHP_FUNCTION(mb_convert_variables);
|
||||
PHP_FUNCTION(mb_encode_numericentity);
|
||||
PHP_FUNCTION(mb_decode_numericentity);
|
||||
PHP_FUNCTION(mb_send_mail);
|
||||
PHP_FUNCTION(mb_get_info);
|
||||
PHP_FUNCTION(mb_check_encoding);
|
||||
PHP_FUNCTION(mb_ord);
|
||||
PHP_FUNCTION(mb_chr);
|
||||
PHP_FUNCTION(mb_scrub);
|
||||
|
||||
|
||||
MBSTRING_API char *php_mb_safe_strrchr_ex(const char *s, unsigned int c,
|
||||
size_t nbytes, const mbfl_encoding *enc);
|
||||
MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function mb_language(string $language = UNKNOWN): string|bool {}
|
||||
|
||||
function mb_internal_encoding(string $encoding = UNKNOWN): string|bool {}
|
||||
|
||||
@@ -305,3 +305,192 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_regex_set_options, 0, 0, IS_S
|
||||
ZEND_ARG_TYPE_INFO(0, options, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_FUNCTION(mb_language);
|
||||
ZEND_FUNCTION(mb_internal_encoding);
|
||||
ZEND_FUNCTION(mb_http_input);
|
||||
ZEND_FUNCTION(mb_http_output);
|
||||
ZEND_FUNCTION(mb_detect_order);
|
||||
ZEND_FUNCTION(mb_substitute_character);
|
||||
ZEND_FUNCTION(mb_preferred_mime_name);
|
||||
ZEND_FUNCTION(mb_parse_str);
|
||||
ZEND_FUNCTION(mb_output_handler);
|
||||
ZEND_FUNCTION(mb_str_split);
|
||||
ZEND_FUNCTION(mb_strlen);
|
||||
ZEND_FUNCTION(mb_strpos);
|
||||
ZEND_FUNCTION(mb_strrpos);
|
||||
ZEND_FUNCTION(mb_stripos);
|
||||
ZEND_FUNCTION(mb_strripos);
|
||||
ZEND_FUNCTION(mb_strstr);
|
||||
ZEND_FUNCTION(mb_strrchr);
|
||||
ZEND_FUNCTION(mb_stristr);
|
||||
ZEND_FUNCTION(mb_strrichr);
|
||||
ZEND_FUNCTION(mb_substr_count);
|
||||
ZEND_FUNCTION(mb_substr);
|
||||
ZEND_FUNCTION(mb_strcut);
|
||||
ZEND_FUNCTION(mb_strwidth);
|
||||
ZEND_FUNCTION(mb_strimwidth);
|
||||
ZEND_FUNCTION(mb_convert_encoding);
|
||||
ZEND_FUNCTION(mb_convert_case);
|
||||
ZEND_FUNCTION(mb_strtoupper);
|
||||
ZEND_FUNCTION(mb_strtolower);
|
||||
ZEND_FUNCTION(mb_detect_encoding);
|
||||
ZEND_FUNCTION(mb_list_encodings);
|
||||
ZEND_FUNCTION(mb_encoding_aliases);
|
||||
ZEND_FUNCTION(mb_encode_mimeheader);
|
||||
ZEND_FUNCTION(mb_decode_mimeheader);
|
||||
ZEND_FUNCTION(mb_convert_kana);
|
||||
ZEND_FUNCTION(mb_convert_variables);
|
||||
ZEND_FUNCTION(mb_encode_numericentity);
|
||||
ZEND_FUNCTION(mb_decode_numericentity);
|
||||
ZEND_FUNCTION(mb_send_mail);
|
||||
ZEND_FUNCTION(mb_get_info);
|
||||
ZEND_FUNCTION(mb_check_encoding);
|
||||
ZEND_FUNCTION(mb_scrub);
|
||||
ZEND_FUNCTION(mb_ord);
|
||||
ZEND_FUNCTION(mb_chr);
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_regex_encoding);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_eregi);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_replace);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_eregi_replace);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_replace_callback);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_split);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_match);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_search);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_search_pos);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_search_regs);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_search_init);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_search_getregs);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_search_getpos);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_ereg_search_setpos);
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FUNCTION(mb_regex_set_options);
|
||||
#endif
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(mb_language, arginfo_mb_language)
|
||||
ZEND_FE(mb_internal_encoding, arginfo_mb_internal_encoding)
|
||||
ZEND_FE(mb_http_input, arginfo_mb_http_input)
|
||||
ZEND_FE(mb_http_output, arginfo_mb_http_output)
|
||||
ZEND_FE(mb_detect_order, arginfo_mb_detect_order)
|
||||
ZEND_FE(mb_substitute_character, arginfo_mb_substitute_character)
|
||||
ZEND_FE(mb_preferred_mime_name, arginfo_mb_preferred_mime_name)
|
||||
ZEND_FE(mb_parse_str, arginfo_mb_parse_str)
|
||||
ZEND_FE(mb_output_handler, arginfo_mb_output_handler)
|
||||
ZEND_FE(mb_str_split, arginfo_mb_str_split)
|
||||
ZEND_FE(mb_strlen, arginfo_mb_strlen)
|
||||
ZEND_FE(mb_strpos, arginfo_mb_strpos)
|
||||
ZEND_FE(mb_strrpos, arginfo_mb_strrpos)
|
||||
ZEND_FE(mb_stripos, arginfo_mb_stripos)
|
||||
ZEND_FE(mb_strripos, arginfo_mb_strripos)
|
||||
ZEND_FE(mb_strstr, arginfo_mb_strstr)
|
||||
ZEND_FE(mb_strrchr, arginfo_mb_strrchr)
|
||||
ZEND_FE(mb_stristr, arginfo_mb_stristr)
|
||||
ZEND_FE(mb_strrichr, arginfo_mb_strrichr)
|
||||
ZEND_FE(mb_substr_count, arginfo_mb_substr_count)
|
||||
ZEND_FE(mb_substr, arginfo_mb_substr)
|
||||
ZEND_FE(mb_strcut, arginfo_mb_strcut)
|
||||
ZEND_FE(mb_strwidth, arginfo_mb_strwidth)
|
||||
ZEND_FE(mb_strimwidth, arginfo_mb_strimwidth)
|
||||
ZEND_FE(mb_convert_encoding, arginfo_mb_convert_encoding)
|
||||
ZEND_FE(mb_convert_case, arginfo_mb_convert_case)
|
||||
ZEND_FE(mb_strtoupper, arginfo_mb_strtoupper)
|
||||
ZEND_FE(mb_strtolower, arginfo_mb_strtolower)
|
||||
ZEND_FE(mb_detect_encoding, arginfo_mb_detect_encoding)
|
||||
ZEND_FE(mb_list_encodings, arginfo_mb_list_encodings)
|
||||
ZEND_FE(mb_encoding_aliases, arginfo_mb_encoding_aliases)
|
||||
ZEND_FE(mb_encode_mimeheader, arginfo_mb_encode_mimeheader)
|
||||
ZEND_FE(mb_decode_mimeheader, arginfo_mb_decode_mimeheader)
|
||||
ZEND_FE(mb_convert_kana, arginfo_mb_convert_kana)
|
||||
ZEND_FE(mb_convert_variables, arginfo_mb_convert_variables)
|
||||
ZEND_FE(mb_encode_numericentity, arginfo_mb_encode_numericentity)
|
||||
ZEND_FE(mb_decode_numericentity, arginfo_mb_decode_numericentity)
|
||||
ZEND_FE(mb_send_mail, arginfo_mb_send_mail)
|
||||
ZEND_FE(mb_get_info, arginfo_mb_get_info)
|
||||
ZEND_FE(mb_check_encoding, arginfo_mb_check_encoding)
|
||||
ZEND_FE(mb_scrub, arginfo_mb_scrub)
|
||||
ZEND_FE(mb_ord, arginfo_mb_ord)
|
||||
ZEND_FE(mb_chr, arginfo_mb_chr)
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_regex_encoding, arginfo_mb_regex_encoding)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg, arginfo_mb_ereg)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_eregi, arginfo_mb_eregi)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_replace, arginfo_mb_ereg_replace)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_eregi_replace, arginfo_mb_eregi_replace)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_replace_callback, arginfo_mb_ereg_replace_callback)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_split, arginfo_mb_split)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_match, arginfo_mb_ereg_match)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_search, arginfo_mb_ereg_search)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_search_pos, arginfo_mb_ereg_search_pos)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_search_regs, arginfo_mb_ereg_search_regs)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_search_init, arginfo_mb_ereg_search_init)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_search_getregs, arginfo_mb_ereg_search_getregs)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_search_getpos, arginfo_mb_ereg_search_getpos)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_ereg_search_setpos, arginfo_mb_ereg_search_setpos)
|
||||
#endif
|
||||
#if HAVE_MBREGEX
|
||||
ZEND_FE(mb_regex_set_options, arginfo_mb_regex_set_options)
|
||||
#endif
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -22,26 +22,6 @@
|
||||
#include "php.h"
|
||||
#include "zend.h"
|
||||
|
||||
/* {{{ PHP_MBREGEX_FUNCTION_ENTRIES */
|
||||
#define PHP_MBREGEX_FUNCTION_ENTRIES \
|
||||
PHP_FE(mb_regex_encoding, arginfo_mb_regex_encoding) \
|
||||
PHP_FE(mb_regex_set_options, arginfo_mb_regex_set_options) \
|
||||
PHP_FE(mb_ereg, arginfo_mb_ereg) \
|
||||
PHP_FE(mb_eregi, arginfo_mb_eregi) \
|
||||
PHP_FE(mb_ereg_replace, arginfo_mb_ereg_replace) \
|
||||
PHP_FE(mb_eregi_replace, arginfo_mb_eregi_replace) \
|
||||
PHP_FE(mb_ereg_replace_callback, arginfo_mb_ereg_replace_callback) \
|
||||
PHP_FE(mb_split, arginfo_mb_split) \
|
||||
PHP_FE(mb_ereg_match, arginfo_mb_ereg_match) \
|
||||
PHP_FE(mb_ereg_search, arginfo_mb_ereg_search) \
|
||||
PHP_FE(mb_ereg_search_pos, arginfo_mb_ereg_search_pos) \
|
||||
PHP_FE(mb_ereg_search_regs, arginfo_mb_ereg_search_regs) \
|
||||
PHP_FE(mb_ereg_search_init, arginfo_mb_ereg_search_init) \
|
||||
PHP_FE(mb_ereg_search_getregs, arginfo_mb_ereg_search_getregs) \
|
||||
PHP_FE(mb_ereg_search_getpos, arginfo_mb_ereg_search_getpos) \
|
||||
PHP_FE(mb_ereg_search_setpos, arginfo_mb_ereg_search_setpos)
|
||||
/* }}} */
|
||||
|
||||
#define PHP_MBREGEX_MAXCACHE 50
|
||||
|
||||
PHP_MINIT_FUNCTION(mb_regex);
|
||||
@@ -59,23 +39,6 @@ int php_mb_regex_set_default_mbctype(const char *encname);
|
||||
const char *php_mb_regex_get_mbctype(void);
|
||||
const char *php_mb_regex_get_default_mbctype(void);
|
||||
|
||||
PHP_FUNCTION(mb_regex_encoding);
|
||||
PHP_FUNCTION(mb_ereg);
|
||||
PHP_FUNCTION(mb_eregi);
|
||||
PHP_FUNCTION(mb_ereg_replace);
|
||||
PHP_FUNCTION(mb_eregi_replace);
|
||||
PHP_FUNCTION(mb_ereg_replace_callback);
|
||||
PHP_FUNCTION(mb_split);
|
||||
PHP_FUNCTION(mb_ereg_match);
|
||||
PHP_FUNCTION(mb_ereg_search);
|
||||
PHP_FUNCTION(mb_ereg_search_pos);
|
||||
PHP_FUNCTION(mb_ereg_search_regs);
|
||||
PHP_FUNCTION(mb_ereg_search_init);
|
||||
PHP_FUNCTION(mb_ereg_search_getregs);
|
||||
PHP_FUNCTION(mb_ereg_search_getpos);
|
||||
PHP_FUNCTION(mb_ereg_search_setpos);
|
||||
PHP_FUNCTION(mb_regex_set_options);
|
||||
|
||||
#endif /* HAVE_MBREGEX */
|
||||
|
||||
#endif /* _PHP_MBREGEX_H */
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function odbc_close_all(): void {}
|
||||
|
||||
/** @param resource $result_id */
|
||||
|
||||
@@ -246,3 +246,134 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_columnprivileges, 0, 0, 5)
|
||||
ZEND_ARG_TYPE_INFO(0, column, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_FUNCTION(odbc_close_all);
|
||||
ZEND_FUNCTION(odbc_binmode);
|
||||
ZEND_FUNCTION(odbc_longreadlen);
|
||||
ZEND_FUNCTION(odbc_prepare);
|
||||
ZEND_FUNCTION(odbc_execute);
|
||||
ZEND_FUNCTION(odbc_cursor);
|
||||
#if defined(HAVE_SQLDATASOURCES)
|
||||
ZEND_FUNCTION(odbc_data_source);
|
||||
#endif
|
||||
ZEND_FUNCTION(odbc_exec);
|
||||
#if defined(PHP_ODBC_HAVE_FETCH_HASH)
|
||||
ZEND_FUNCTION(odbc_fetch_object);
|
||||
#endif
|
||||
#if defined(PHP_ODBC_HAVE_FETCH_HASH)
|
||||
ZEND_FUNCTION(odbc_fetch_array);
|
||||
#endif
|
||||
ZEND_FUNCTION(odbc_fetch_into);
|
||||
ZEND_FUNCTION(odbc_fetch_row);
|
||||
ZEND_FUNCTION(odbc_result);
|
||||
ZEND_FUNCTION(odbc_result_all);
|
||||
ZEND_FUNCTION(odbc_free_result);
|
||||
ZEND_FUNCTION(odbc_connect);
|
||||
ZEND_FUNCTION(odbc_pconnect);
|
||||
ZEND_FUNCTION(odbc_close);
|
||||
ZEND_FUNCTION(odbc_num_rows);
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
|
||||
ZEND_FUNCTION(odbc_next_result);
|
||||
#endif
|
||||
ZEND_FUNCTION(odbc_num_fields);
|
||||
ZEND_FUNCTION(odbc_field_name);
|
||||
ZEND_FUNCTION(odbc_field_type);
|
||||
ZEND_FUNCTION(odbc_field_len);
|
||||
ZEND_FUNCTION(odbc_field_scale);
|
||||
ZEND_FUNCTION(odbc_field_num);
|
||||
ZEND_FUNCTION(odbc_autocommit);
|
||||
ZEND_FUNCTION(odbc_commit);
|
||||
ZEND_FUNCTION(odbc_rollback);
|
||||
ZEND_FUNCTION(odbc_error);
|
||||
ZEND_FUNCTION(odbc_errormsg);
|
||||
ZEND_FUNCTION(odbc_setoption);
|
||||
ZEND_FUNCTION(odbc_tables);
|
||||
ZEND_FUNCTION(odbc_columns);
|
||||
ZEND_FUNCTION(odbc_gettypeinfo);
|
||||
ZEND_FUNCTION(odbc_primarykeys);
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
|
||||
ZEND_FUNCTION(odbc_procedurecolumns);
|
||||
#endif
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
|
||||
ZEND_FUNCTION(odbc_procedures);
|
||||
#endif
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
|
||||
ZEND_FUNCTION(odbc_foreignkeys);
|
||||
#endif
|
||||
ZEND_FUNCTION(odbc_specialcolumns);
|
||||
ZEND_FUNCTION(odbc_statistics);
|
||||
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
|
||||
ZEND_FUNCTION(odbc_tableprivileges);
|
||||
#endif
|
||||
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
|
||||
ZEND_FUNCTION(odbc_columnprivileges);
|
||||
#endif
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(odbc_close_all, arginfo_odbc_close_all)
|
||||
ZEND_FE(odbc_binmode, arginfo_odbc_binmode)
|
||||
ZEND_FE(odbc_longreadlen, arginfo_odbc_longreadlen)
|
||||
ZEND_FE(odbc_prepare, arginfo_odbc_prepare)
|
||||
ZEND_FE(odbc_execute, arginfo_odbc_execute)
|
||||
ZEND_FE(odbc_cursor, arginfo_odbc_cursor)
|
||||
#if defined(HAVE_SQLDATASOURCES)
|
||||
ZEND_FE(odbc_data_source, arginfo_odbc_data_source)
|
||||
#endif
|
||||
ZEND_FE(odbc_exec, arginfo_odbc_exec)
|
||||
ZEND_FALIAS(odbc_do, odbc_exec, arginfo_odbc_do)
|
||||
#if defined(PHP_ODBC_HAVE_FETCH_HASH)
|
||||
ZEND_FE(odbc_fetch_object, arginfo_odbc_fetch_object)
|
||||
#endif
|
||||
#if defined(PHP_ODBC_HAVE_FETCH_HASH)
|
||||
ZEND_FE(odbc_fetch_array, arginfo_odbc_fetch_array)
|
||||
#endif
|
||||
ZEND_FE(odbc_fetch_into, arginfo_odbc_fetch_into)
|
||||
ZEND_FE(odbc_fetch_row, arginfo_odbc_fetch_row)
|
||||
ZEND_FE(odbc_result, arginfo_odbc_result)
|
||||
ZEND_FE(odbc_result_all, arginfo_odbc_result_all)
|
||||
ZEND_FE(odbc_free_result, arginfo_odbc_free_result)
|
||||
ZEND_FE(odbc_connect, arginfo_odbc_connect)
|
||||
ZEND_FE(odbc_pconnect, arginfo_odbc_pconnect)
|
||||
ZEND_FE(odbc_close, arginfo_odbc_close)
|
||||
ZEND_FE(odbc_num_rows, arginfo_odbc_num_rows)
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
|
||||
ZEND_FE(odbc_next_result, arginfo_odbc_next_result)
|
||||
#endif
|
||||
ZEND_FE(odbc_num_fields, arginfo_odbc_num_fields)
|
||||
ZEND_FE(odbc_field_name, arginfo_odbc_field_name)
|
||||
ZEND_FE(odbc_field_type, arginfo_odbc_field_type)
|
||||
ZEND_FE(odbc_field_len, arginfo_odbc_field_len)
|
||||
ZEND_FALIAS(odbc_field_precision, odbc_field_len, arginfo_odbc_field_precision)
|
||||
ZEND_FE(odbc_field_scale, arginfo_odbc_field_scale)
|
||||
ZEND_FE(odbc_field_num, arginfo_odbc_field_num)
|
||||
ZEND_FE(odbc_autocommit, arginfo_odbc_autocommit)
|
||||
ZEND_FE(odbc_commit, arginfo_odbc_commit)
|
||||
ZEND_FE(odbc_rollback, arginfo_odbc_rollback)
|
||||
ZEND_FE(odbc_error, arginfo_odbc_error)
|
||||
ZEND_FE(odbc_errormsg, arginfo_odbc_errormsg)
|
||||
ZEND_FE(odbc_setoption, arginfo_odbc_setoption)
|
||||
ZEND_FE(odbc_tables, arginfo_odbc_tables)
|
||||
ZEND_FE(odbc_columns, arginfo_odbc_columns)
|
||||
ZEND_FE(odbc_gettypeinfo, arginfo_odbc_gettypeinfo)
|
||||
ZEND_FE(odbc_primarykeys, arginfo_odbc_primarykeys)
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
|
||||
ZEND_FE(odbc_procedurecolumns, arginfo_odbc_procedurecolumns)
|
||||
#endif
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
|
||||
ZEND_FE(odbc_procedures, arginfo_odbc_procedures)
|
||||
#endif
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
|
||||
ZEND_FE(odbc_foreignkeys, arginfo_odbc_foreignkeys)
|
||||
#endif
|
||||
ZEND_FE(odbc_specialcolumns, arginfo_odbc_specialcolumns)
|
||||
ZEND_FE(odbc_statistics, arginfo_odbc_statistics)
|
||||
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
|
||||
ZEND_FE(odbc_tableprivileges, arginfo_odbc_tableprivileges)
|
||||
#endif
|
||||
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
|
||||
ZEND_FE(odbc_columnprivileges, arginfo_odbc_columnprivileges)
|
||||
#endif
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -63,68 +63,6 @@ static int le_result, le_conn, le_pconn;
|
||||
|
||||
#define SAFE_SQL_NTS(n) ((SQLSMALLINT) ((n)?(SQL_NTS):0))
|
||||
|
||||
/* {{{ odbc_functions[]
|
||||
*/
|
||||
static const zend_function_entry odbc_functions[] = {
|
||||
PHP_FE(odbc_autocommit, arginfo_odbc_autocommit)
|
||||
PHP_FE(odbc_binmode, arginfo_odbc_binmode)
|
||||
PHP_FE(odbc_close, arginfo_odbc_close)
|
||||
PHP_FE(odbc_close_all, arginfo_odbc_close_all)
|
||||
PHP_FE(odbc_columns, arginfo_odbc_columns)
|
||||
PHP_FE(odbc_commit, arginfo_odbc_commit)
|
||||
PHP_FE(odbc_connect, arginfo_odbc_connect)
|
||||
PHP_FE(odbc_cursor, arginfo_odbc_cursor)
|
||||
#ifdef HAVE_SQLDATASOURCES
|
||||
PHP_FE(odbc_data_source, arginfo_odbc_data_source)
|
||||
#endif
|
||||
PHP_FE(odbc_execute, arginfo_odbc_execute)
|
||||
PHP_FE(odbc_error, arginfo_odbc_error)
|
||||
PHP_FE(odbc_errormsg, arginfo_odbc_errormsg)
|
||||
PHP_FE(odbc_exec, arginfo_odbc_exec)
|
||||
#ifdef PHP_ODBC_HAVE_FETCH_HASH
|
||||
PHP_FE(odbc_fetch_array, arginfo_odbc_fetch_array)
|
||||
PHP_FE(odbc_fetch_object, arginfo_odbc_fetch_object)
|
||||
#endif
|
||||
PHP_FE(odbc_fetch_row, arginfo_odbc_fetch_row)
|
||||
PHP_FE(odbc_fetch_into, arginfo_odbc_fetch_into)
|
||||
PHP_FE(odbc_field_len, arginfo_odbc_field_len)
|
||||
PHP_FE(odbc_field_scale, arginfo_odbc_field_scale)
|
||||
PHP_FE(odbc_field_name, arginfo_odbc_field_name)
|
||||
PHP_FE(odbc_field_type, arginfo_odbc_field_type)
|
||||
PHP_FE(odbc_field_num, arginfo_odbc_field_num)
|
||||
PHP_FE(odbc_free_result, arginfo_odbc_free_result)
|
||||
PHP_FE(odbc_gettypeinfo, arginfo_odbc_gettypeinfo)
|
||||
PHP_FE(odbc_longreadlen, arginfo_odbc_longreadlen)
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
|
||||
PHP_FE(odbc_next_result, arginfo_odbc_next_result)
|
||||
#endif
|
||||
PHP_FE(odbc_num_fields, arginfo_odbc_num_fields)
|
||||
PHP_FE(odbc_num_rows, arginfo_odbc_num_rows)
|
||||
PHP_FE(odbc_pconnect, arginfo_odbc_pconnect)
|
||||
PHP_FE(odbc_prepare, arginfo_odbc_prepare)
|
||||
PHP_FE(odbc_result, arginfo_odbc_result)
|
||||
PHP_FE(odbc_result_all, arginfo_odbc_result_all)
|
||||
PHP_FE(odbc_rollback, arginfo_odbc_rollback)
|
||||
PHP_FE(odbc_setoption, arginfo_odbc_setoption)
|
||||
PHP_FE(odbc_specialcolumns, arginfo_odbc_specialcolumns)
|
||||
PHP_FE(odbc_statistics, arginfo_odbc_statistics)
|
||||
PHP_FE(odbc_tables, arginfo_odbc_tables)
|
||||
PHP_FE(odbc_primarykeys, arginfo_odbc_primarykeys)
|
||||
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) /* not supported now */
|
||||
PHP_FE(odbc_columnprivileges, arginfo_odbc_columnprivileges)
|
||||
PHP_FE(odbc_tableprivileges, arginfo_odbc_tableprivileges)
|
||||
#endif
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) /* not supported */
|
||||
PHP_FE(odbc_foreignkeys, arginfo_odbc_foreignkeys)
|
||||
PHP_FE(odbc_procedures, arginfo_odbc_procedures)
|
||||
PHP_FE(odbc_procedurecolumns, arginfo_odbc_procedurecolumns)
|
||||
#endif
|
||||
PHP_FALIAS(odbc_do, odbc_exec, arginfo_odbc_do)
|
||||
PHP_FALIAS(odbc_field_precision, odbc_field_len, arginfo_odbc_field_precision)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
PHP_ODBC_API ZEND_DECLARE_MODULE_GLOBALS(odbc)
|
||||
static PHP_GINIT_FUNCTION(odbc);
|
||||
|
||||
@@ -133,7 +71,7 @@ static PHP_GINIT_FUNCTION(odbc);
|
||||
zend_module_entry odbc_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"odbc",
|
||||
odbc_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(odbc),
|
||||
PHP_MSHUTDOWN(odbc),
|
||||
PHP_RINIT(odbc),
|
||||
|
||||
@@ -42,61 +42,6 @@ PHP_RINIT_FUNCTION(odbc);
|
||||
PHP_RSHUTDOWN_FUNCTION(odbc);
|
||||
PHP_MINFO_FUNCTION(odbc);
|
||||
|
||||
PHP_FUNCTION(odbc_error);
|
||||
PHP_FUNCTION(odbc_errormsg);
|
||||
PHP_FUNCTION(odbc_setoption);
|
||||
PHP_FUNCTION(odbc_autocommit);
|
||||
PHP_FUNCTION(odbc_close);
|
||||
PHP_FUNCTION(odbc_close_all);
|
||||
PHP_FUNCTION(odbc_commit);
|
||||
PHP_FUNCTION(odbc_connect);
|
||||
PHP_FUNCTION(odbc_pconnect);
|
||||
PHP_FUNCTION(odbc_cursor);
|
||||
#ifdef HAVE_SQLDATASOURCES
|
||||
PHP_FUNCTION(odbc_data_source);
|
||||
#endif
|
||||
PHP_FUNCTION(odbc_do);
|
||||
PHP_FUNCTION(odbc_exec);
|
||||
PHP_FUNCTION(odbc_execute);
|
||||
#ifdef PHP_ODBC_HAVE_FETCH_HASH
|
||||
PHP_FUNCTION(odbc_fetch_array);
|
||||
PHP_FUNCTION(odbc_fetch_object);
|
||||
#endif
|
||||
PHP_FUNCTION(odbc_fetch_into);
|
||||
PHP_FUNCTION(odbc_fetch_row);
|
||||
PHP_FUNCTION(odbc_field_len);
|
||||
PHP_FUNCTION(odbc_field_scale);
|
||||
PHP_FUNCTION(odbc_field_name);
|
||||
PHP_FUNCTION(odbc_field_type);
|
||||
PHP_FUNCTION(odbc_field_num);
|
||||
PHP_FUNCTION(odbc_free_result);
|
||||
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
|
||||
PHP_FUNCTION(odbc_next_result);
|
||||
#endif
|
||||
PHP_FUNCTION(odbc_num_fields);
|
||||
PHP_FUNCTION(odbc_num_rows);
|
||||
PHP_FUNCTION(odbc_prepare);
|
||||
PHP_FUNCTION(odbc_result);
|
||||
PHP_FUNCTION(odbc_result_all);
|
||||
PHP_FUNCTION(odbc_rollback);
|
||||
PHP_FUNCTION(odbc_binmode);
|
||||
PHP_FUNCTION(odbc_longreadlen);
|
||||
PHP_FUNCTION(odbc_tables);
|
||||
PHP_FUNCTION(odbc_columns);
|
||||
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_35) /* not supported now */
|
||||
PHP_FUNCTION(odbc_columnprivileges);
|
||||
PHP_FUNCTION(odbc_tableprivileges);
|
||||
#endif
|
||||
#if !defined(HAVE_SOLID) || !defined(HAVE_SOLID_35) /* not supported */
|
||||
PHP_FUNCTION(odbc_foreignkeys);
|
||||
PHP_FUNCTION(odbc_procedures);
|
||||
PHP_FUNCTION(odbc_procedurecolumns);
|
||||
#endif
|
||||
PHP_FUNCTION(odbc_gettypeinfo);
|
||||
PHP_FUNCTION(odbc_primarykeys);
|
||||
PHP_FUNCTION(odbc_specialcolumns);
|
||||
PHP_FUNCTION(odbc_statistics);
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
# define PHP_ODBC_API __declspec(dllexport)
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function opcache_reset(): bool {}
|
||||
|
||||
function opcache_get_status(bool $fetch_scripts = true): array|false {}
|
||||
|
||||
@@ -22,3 +22,22 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_is_script_cached, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, script, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(opcache_reset);
|
||||
ZEND_FUNCTION(opcache_get_status);
|
||||
ZEND_FUNCTION(opcache_compile_file);
|
||||
ZEND_FUNCTION(opcache_invalidate);
|
||||
ZEND_FUNCTION(opcache_get_configuration);
|
||||
ZEND_FUNCTION(opcache_is_script_cached);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(opcache_reset, arginfo_opcache_reset)
|
||||
ZEND_FE(opcache_get_status, arginfo_opcache_get_status)
|
||||
ZEND_FE(opcache_compile_file, arginfo_opcache_compile_file)
|
||||
ZEND_FE(opcache_invalidate, arginfo_opcache_invalidate)
|
||||
ZEND_FE(opcache_get_configuration, arginfo_opcache_get_configuration)
|
||||
ZEND_FE(opcache_is_script_cached, arginfo_opcache_is_script_cached)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -46,28 +46,6 @@ static zif_handler orig_file_exists = NULL;
|
||||
static zif_handler orig_is_file = NULL;
|
||||
static zif_handler orig_is_readable = NULL;
|
||||
|
||||
/* User functions */
|
||||
static ZEND_FUNCTION(opcache_reset);
|
||||
static ZEND_FUNCTION(opcache_invalidate);
|
||||
static ZEND_FUNCTION(opcache_is_script_cached);
|
||||
|
||||
/* Private functions */
|
||||
static ZEND_FUNCTION(opcache_get_status);
|
||||
static ZEND_FUNCTION(opcache_compile_file);
|
||||
static ZEND_FUNCTION(opcache_get_configuration);
|
||||
|
||||
static const zend_function_entry accel_functions[] = {
|
||||
/* User functions */
|
||||
ZEND_FE(opcache_reset, arginfo_opcache_reset)
|
||||
ZEND_FE(opcache_invalidate, arginfo_opcache_invalidate)
|
||||
ZEND_FE(opcache_compile_file, arginfo_opcache_compile_file)
|
||||
ZEND_FE(opcache_is_script_cached, arginfo_opcache_is_script_cached)
|
||||
/* Private functions */
|
||||
ZEND_FE(opcache_get_configuration, arginfo_opcache_get_configuration)
|
||||
ZEND_FE(opcache_get_status, arginfo_opcache_get_status)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
static int validate_api_restriction(void)
|
||||
{
|
||||
if (ZCG(accel_directives).restrict_api && *ZCG(accel_directives).restrict_api) {
|
||||
@@ -509,7 +487,7 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
|
||||
static zend_module_entry accel_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
ACCELERATOR_PRODUCT_NAME,
|
||||
accel_functions,
|
||||
ext_functions,
|
||||
ZEND_MINIT(zend_accelerator),
|
||||
ZEND_MSHUTDOWN(zend_accelerator),
|
||||
accel_activate,
|
||||
@@ -578,7 +556,7 @@ static int accelerator_get_scripts(zval *return_value)
|
||||
|
||||
/* {{{ proto array accelerator_get_status([bool fetch_scripts])
|
||||
Obtain statistics information regarding code acceleration */
|
||||
static ZEND_FUNCTION(opcache_get_status)
|
||||
ZEND_FUNCTION(opcache_get_status)
|
||||
{
|
||||
zend_long reqs;
|
||||
zval memory_usage, statistics, scripts;
|
||||
@@ -712,7 +690,7 @@ static int add_blacklist_path(zend_blacklist_entry *p, zval *return_value)
|
||||
|
||||
/* {{{ proto array accelerator_get_configuration()
|
||||
Obtain configuration information */
|
||||
static ZEND_FUNCTION(opcache_get_configuration)
|
||||
ZEND_FUNCTION(opcache_get_configuration)
|
||||
{
|
||||
zval directives, version, blacklist;
|
||||
|
||||
@@ -806,7 +784,7 @@ static ZEND_FUNCTION(opcache_get_configuration)
|
||||
|
||||
/* {{{ proto void accelerator_reset()
|
||||
Request that the contents of the opcode cache to be reset */
|
||||
static ZEND_FUNCTION(opcache_reset)
|
||||
ZEND_FUNCTION(opcache_reset)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -833,7 +811,7 @@ static ZEND_FUNCTION(opcache_reset)
|
||||
|
||||
/* {{{ proto void opcache_invalidate(string $script [, bool $force = false])
|
||||
Invalidates cached script (in necessary or forced) */
|
||||
static ZEND_FUNCTION(opcache_invalidate)
|
||||
ZEND_FUNCTION(opcache_invalidate)
|
||||
{
|
||||
char *script_name;
|
||||
size_t script_name_len;
|
||||
@@ -854,7 +832,7 @@ static ZEND_FUNCTION(opcache_invalidate)
|
||||
}
|
||||
}
|
||||
|
||||
static ZEND_FUNCTION(opcache_compile_file)
|
||||
ZEND_FUNCTION(opcache_compile_file)
|
||||
{
|
||||
char *script_name;
|
||||
size_t script_name_len;
|
||||
@@ -906,7 +884,7 @@ static ZEND_FUNCTION(opcache_compile_file)
|
||||
|
||||
/* {{{ proto bool opcache_is_script_cached(string $script)
|
||||
Return true if the script is cached in OPCache, false if it is not cached or if OPCache is not running. */
|
||||
static ZEND_FUNCTION(opcache_is_script_cached)
|
||||
ZEND_FUNCTION(opcache_is_script_cached)
|
||||
{
|
||||
zend_string *script_name;
|
||||
|
||||
|
||||
@@ -115,113 +115,12 @@ enum php_openssl_cipher_type {
|
||||
PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40
|
||||
};
|
||||
|
||||
PHP_FUNCTION(openssl_get_md_methods);
|
||||
PHP_FUNCTION(openssl_get_cipher_methods);
|
||||
#ifdef HAVE_EVP_PKEY_EC
|
||||
PHP_FUNCTION(openssl_get_curve_names);
|
||||
#endif
|
||||
|
||||
PHP_FUNCTION(openssl_digest);
|
||||
PHP_FUNCTION(openssl_encrypt);
|
||||
PHP_FUNCTION(openssl_decrypt);
|
||||
PHP_FUNCTION(openssl_cipher_iv_length);
|
||||
|
||||
PHP_FUNCTION(openssl_dh_compute_key);
|
||||
PHP_FUNCTION(openssl_pkey_derive);
|
||||
PHP_FUNCTION(openssl_random_pseudo_bytes);
|
||||
|
||||
/* {{{ openssl_functions[]
|
||||
*/
|
||||
static const zend_function_entry openssl_functions[] = {
|
||||
PHP_FE(openssl_get_cert_locations, arginfo_openssl_get_cert_locations)
|
||||
|
||||
/* spki functions */
|
||||
PHP_FE(openssl_spki_new, arginfo_openssl_spki_new)
|
||||
PHP_FE(openssl_spki_verify, arginfo_openssl_spki_verify)
|
||||
PHP_FE(openssl_spki_export, arginfo_openssl_spki_export)
|
||||
PHP_FE(openssl_spki_export_challenge, arginfo_openssl_spki_export_challenge)
|
||||
|
||||
/* public/private key functions */
|
||||
PHP_FE(openssl_pkey_free, arginfo_openssl_pkey_free)
|
||||
PHP_FE(openssl_pkey_new, arginfo_openssl_pkey_new)
|
||||
PHP_FE(openssl_pkey_export, arginfo_openssl_pkey_export)
|
||||
PHP_FE(openssl_pkey_export_to_file, arginfo_openssl_pkey_export_to_file)
|
||||
PHP_FE(openssl_pkey_get_private, arginfo_openssl_pkey_get_private)
|
||||
PHP_FE(openssl_pkey_get_public, arginfo_openssl_pkey_get_public)
|
||||
PHP_FE(openssl_pkey_get_details, arginfo_openssl_pkey_get_details)
|
||||
|
||||
PHP_FALIAS(openssl_free_key, openssl_pkey_free, arginfo_openssl_free_key)
|
||||
PHP_FALIAS(openssl_get_privatekey, openssl_pkey_get_private, arginfo_openssl_get_privatekey)
|
||||
PHP_FALIAS(openssl_get_publickey, openssl_pkey_get_public, arginfo_openssl_get_publickey)
|
||||
|
||||
/* x.509 cert funcs */
|
||||
PHP_FE(openssl_x509_read, arginfo_openssl_x509_read)
|
||||
PHP_FE(openssl_x509_free, arginfo_openssl_x509_free)
|
||||
PHP_FE(openssl_x509_parse, arginfo_openssl_x509_parse)
|
||||
PHP_FE(openssl_x509_checkpurpose, arginfo_openssl_x509_checkpurpose)
|
||||
PHP_FE(openssl_x509_check_private_key, arginfo_openssl_x509_check_private_key)
|
||||
PHP_FE(openssl_x509_verify, arginfo_openssl_x509_verify)
|
||||
PHP_FE(openssl_x509_export, arginfo_openssl_x509_export)
|
||||
PHP_FE(openssl_x509_fingerprint, arginfo_openssl_x509_fingerprint)
|
||||
PHP_FE(openssl_x509_export_to_file, arginfo_openssl_x509_export_to_file)
|
||||
|
||||
/* PKCS12 funcs */
|
||||
PHP_FE(openssl_pkcs12_export, arginfo_openssl_pkcs12_export)
|
||||
PHP_FE(openssl_pkcs12_export_to_file, arginfo_openssl_pkcs12_export_to_file)
|
||||
PHP_FE(openssl_pkcs12_read, arginfo_openssl_pkcs12_read)
|
||||
|
||||
/* CSR funcs */
|
||||
PHP_FE(openssl_csr_new, arginfo_openssl_csr_new)
|
||||
PHP_FE(openssl_csr_export, arginfo_openssl_csr_export)
|
||||
PHP_FE(openssl_csr_export_to_file, arginfo_openssl_csr_export_to_file)
|
||||
PHP_FE(openssl_csr_sign, arginfo_openssl_csr_sign)
|
||||
PHP_FE(openssl_csr_get_subject, arginfo_openssl_csr_get_subject)
|
||||
PHP_FE(openssl_csr_get_public_key, arginfo_openssl_csr_get_public_key)
|
||||
|
||||
PHP_FE(openssl_digest, arginfo_openssl_digest)
|
||||
PHP_FE(openssl_encrypt, arginfo_openssl_encrypt)
|
||||
PHP_FE(openssl_decrypt, arginfo_openssl_decrypt)
|
||||
PHP_FE(openssl_cipher_iv_length, arginfo_openssl_cipher_iv_length)
|
||||
PHP_FE(openssl_sign, arginfo_openssl_sign)
|
||||
PHP_FE(openssl_verify, arginfo_openssl_verify)
|
||||
PHP_FE(openssl_seal, arginfo_openssl_seal)
|
||||
PHP_FE(openssl_open, arginfo_openssl_open)
|
||||
|
||||
PHP_FE(openssl_pbkdf2, arginfo_openssl_pbkdf2)
|
||||
|
||||
/* for S/MIME handling */
|
||||
PHP_FE(openssl_pkcs7_verify, arginfo_openssl_pkcs7_verify)
|
||||
PHP_FE(openssl_pkcs7_decrypt, arginfo_openssl_pkcs7_decrypt)
|
||||
PHP_FE(openssl_pkcs7_sign, arginfo_openssl_pkcs7_sign)
|
||||
PHP_FE(openssl_pkcs7_encrypt, arginfo_openssl_pkcs7_encrypt)
|
||||
PHP_FE(openssl_pkcs7_read, arginfo_openssl_pkcs7_read)
|
||||
|
||||
PHP_FE(openssl_private_encrypt, arginfo_openssl_private_encrypt)
|
||||
PHP_FE(openssl_private_decrypt, arginfo_openssl_private_decrypt)
|
||||
PHP_FE(openssl_public_encrypt, arginfo_openssl_public_encrypt)
|
||||
PHP_FE(openssl_public_decrypt, arginfo_openssl_public_decrypt)
|
||||
|
||||
PHP_FE(openssl_get_md_methods, arginfo_openssl_get_md_methods)
|
||||
PHP_FE(openssl_get_cipher_methods, arginfo_openssl_get_cipher_methods)
|
||||
#ifdef HAVE_EVP_PKEY_EC
|
||||
PHP_FE(openssl_get_curve_names, arginfo_openssl_get_curve_names)
|
||||
#endif
|
||||
|
||||
PHP_FE(openssl_dh_compute_key, arginfo_openssl_dh_compute_key)
|
||||
PHP_FE(openssl_pkey_derive, arginfo_openssl_pkey_derive)
|
||||
|
||||
PHP_FE(openssl_random_pseudo_bytes, arginfo_openssl_random_pseudo_bytes)
|
||||
PHP_FE(openssl_error_string, arginfo_openssl_error_string)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ openssl_module_entry
|
||||
*/
|
||||
zend_module_entry openssl_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"openssl",
|
||||
openssl_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(openssl),
|
||||
PHP_MSHUTDOWN(openssl),
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function openssl_x509_export_to_file($x509, string $outfilename, bool $notext = true): bool {}
|
||||
|
||||
function openssl_x509_export($x509 , &$out, bool $notext = true): bool {}
|
||||
|
||||
@@ -320,3 +320,127 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_get_cert_locations, 0, 0, IS_ARRAY, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(openssl_x509_export_to_file);
|
||||
ZEND_FUNCTION(openssl_x509_export);
|
||||
ZEND_FUNCTION(openssl_x509_fingerprint);
|
||||
ZEND_FUNCTION(openssl_x509_check_private_key);
|
||||
ZEND_FUNCTION(openssl_x509_verify);
|
||||
ZEND_FUNCTION(openssl_x509_parse);
|
||||
ZEND_FUNCTION(openssl_x509_checkpurpose);
|
||||
ZEND_FUNCTION(openssl_x509_read);
|
||||
ZEND_FUNCTION(openssl_x509_free);
|
||||
ZEND_FUNCTION(openssl_pkcs12_export_to_file);
|
||||
ZEND_FUNCTION(openssl_pkcs12_export);
|
||||
ZEND_FUNCTION(openssl_pkcs12_read);
|
||||
ZEND_FUNCTION(openssl_csr_export_to_file);
|
||||
ZEND_FUNCTION(openssl_csr_export);
|
||||
ZEND_FUNCTION(openssl_csr_sign);
|
||||
ZEND_FUNCTION(openssl_csr_new);
|
||||
ZEND_FUNCTION(openssl_csr_get_subject);
|
||||
ZEND_FUNCTION(openssl_csr_get_public_key);
|
||||
ZEND_FUNCTION(openssl_pkey_new);
|
||||
ZEND_FUNCTION(openssl_pkey_export_to_file);
|
||||
ZEND_FUNCTION(openssl_pkey_export);
|
||||
ZEND_FUNCTION(openssl_pkey_get_public);
|
||||
ZEND_FUNCTION(openssl_pkey_free);
|
||||
ZEND_FUNCTION(openssl_pkey_get_private);
|
||||
ZEND_FUNCTION(openssl_pkey_get_details);
|
||||
ZEND_FUNCTION(openssl_pbkdf2);
|
||||
ZEND_FUNCTION(openssl_pkcs7_verify);
|
||||
ZEND_FUNCTION(openssl_pkcs7_encrypt);
|
||||
ZEND_FUNCTION(openssl_pkcs7_sign);
|
||||
ZEND_FUNCTION(openssl_pkcs7_decrypt);
|
||||
ZEND_FUNCTION(openssl_pkcs7_read);
|
||||
ZEND_FUNCTION(openssl_private_encrypt);
|
||||
ZEND_FUNCTION(openssl_private_decrypt);
|
||||
ZEND_FUNCTION(openssl_public_encrypt);
|
||||
ZEND_FUNCTION(openssl_public_decrypt);
|
||||
ZEND_FUNCTION(openssl_error_string);
|
||||
ZEND_FUNCTION(openssl_sign);
|
||||
ZEND_FUNCTION(openssl_verify);
|
||||
ZEND_FUNCTION(openssl_seal);
|
||||
ZEND_FUNCTION(openssl_open);
|
||||
ZEND_FUNCTION(openssl_get_md_methods);
|
||||
ZEND_FUNCTION(openssl_get_cipher_methods);
|
||||
#if defined(HAVE_EVP_PKEY_EC)
|
||||
ZEND_FUNCTION(openssl_get_curve_names);
|
||||
#endif
|
||||
ZEND_FUNCTION(openssl_digest);
|
||||
ZEND_FUNCTION(openssl_encrypt);
|
||||
ZEND_FUNCTION(openssl_decrypt);
|
||||
ZEND_FUNCTION(openssl_cipher_iv_length);
|
||||
ZEND_FUNCTION(openssl_dh_compute_key);
|
||||
ZEND_FUNCTION(openssl_pkey_derive);
|
||||
ZEND_FUNCTION(openssl_random_pseudo_bytes);
|
||||
ZEND_FUNCTION(openssl_spki_new);
|
||||
ZEND_FUNCTION(openssl_spki_verify);
|
||||
ZEND_FUNCTION(openssl_spki_export);
|
||||
ZEND_FUNCTION(openssl_spki_export_challenge);
|
||||
ZEND_FUNCTION(openssl_get_cert_locations);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(openssl_x509_export_to_file, arginfo_openssl_x509_export_to_file)
|
||||
ZEND_FE(openssl_x509_export, arginfo_openssl_x509_export)
|
||||
ZEND_FE(openssl_x509_fingerprint, arginfo_openssl_x509_fingerprint)
|
||||
ZEND_FE(openssl_x509_check_private_key, arginfo_openssl_x509_check_private_key)
|
||||
ZEND_FE(openssl_x509_verify, arginfo_openssl_x509_verify)
|
||||
ZEND_FE(openssl_x509_parse, arginfo_openssl_x509_parse)
|
||||
ZEND_FE(openssl_x509_checkpurpose, arginfo_openssl_x509_checkpurpose)
|
||||
ZEND_FE(openssl_x509_read, arginfo_openssl_x509_read)
|
||||
ZEND_FE(openssl_x509_free, arginfo_openssl_x509_free)
|
||||
ZEND_FE(openssl_pkcs12_export_to_file, arginfo_openssl_pkcs12_export_to_file)
|
||||
ZEND_FE(openssl_pkcs12_export, arginfo_openssl_pkcs12_export)
|
||||
ZEND_FE(openssl_pkcs12_read, arginfo_openssl_pkcs12_read)
|
||||
ZEND_FE(openssl_csr_export_to_file, arginfo_openssl_csr_export_to_file)
|
||||
ZEND_FE(openssl_csr_export, arginfo_openssl_csr_export)
|
||||
ZEND_FE(openssl_csr_sign, arginfo_openssl_csr_sign)
|
||||
ZEND_FE(openssl_csr_new, arginfo_openssl_csr_new)
|
||||
ZEND_FE(openssl_csr_get_subject, arginfo_openssl_csr_get_subject)
|
||||
ZEND_FE(openssl_csr_get_public_key, arginfo_openssl_csr_get_public_key)
|
||||
ZEND_FE(openssl_pkey_new, arginfo_openssl_pkey_new)
|
||||
ZEND_FE(openssl_pkey_export_to_file, arginfo_openssl_pkey_export_to_file)
|
||||
ZEND_FE(openssl_pkey_export, arginfo_openssl_pkey_export)
|
||||
ZEND_FE(openssl_pkey_get_public, arginfo_openssl_pkey_get_public)
|
||||
ZEND_FALIAS(openssl_get_publickey, openssl_pkey_get_public, arginfo_openssl_get_publickey)
|
||||
ZEND_FE(openssl_pkey_free, arginfo_openssl_pkey_free)
|
||||
ZEND_FALIAS(openssl_free_key, openssl_pkey_free, arginfo_openssl_free_key)
|
||||
ZEND_FE(openssl_pkey_get_private, arginfo_openssl_pkey_get_private)
|
||||
ZEND_FALIAS(openssl_get_privatekey, openssl_pkey_get_private, arginfo_openssl_get_privatekey)
|
||||
ZEND_FE(openssl_pkey_get_details, arginfo_openssl_pkey_get_details)
|
||||
ZEND_FE(openssl_pbkdf2, arginfo_openssl_pbkdf2)
|
||||
ZEND_FE(openssl_pkcs7_verify, arginfo_openssl_pkcs7_verify)
|
||||
ZEND_FE(openssl_pkcs7_encrypt, arginfo_openssl_pkcs7_encrypt)
|
||||
ZEND_FE(openssl_pkcs7_sign, arginfo_openssl_pkcs7_sign)
|
||||
ZEND_FE(openssl_pkcs7_decrypt, arginfo_openssl_pkcs7_decrypt)
|
||||
ZEND_FE(openssl_pkcs7_read, arginfo_openssl_pkcs7_read)
|
||||
ZEND_FE(openssl_private_encrypt, arginfo_openssl_private_encrypt)
|
||||
ZEND_FE(openssl_private_decrypt, arginfo_openssl_private_decrypt)
|
||||
ZEND_FE(openssl_public_encrypt, arginfo_openssl_public_encrypt)
|
||||
ZEND_FE(openssl_public_decrypt, arginfo_openssl_public_decrypt)
|
||||
ZEND_FE(openssl_error_string, arginfo_openssl_error_string)
|
||||
ZEND_FE(openssl_sign, arginfo_openssl_sign)
|
||||
ZEND_FE(openssl_verify, arginfo_openssl_verify)
|
||||
ZEND_FE(openssl_seal, arginfo_openssl_seal)
|
||||
ZEND_FE(openssl_open, arginfo_openssl_open)
|
||||
ZEND_FE(openssl_get_md_methods, arginfo_openssl_get_md_methods)
|
||||
ZEND_FE(openssl_get_cipher_methods, arginfo_openssl_get_cipher_methods)
|
||||
#if defined(HAVE_EVP_PKEY_EC)
|
||||
ZEND_FE(openssl_get_curve_names, arginfo_openssl_get_curve_names)
|
||||
#endif
|
||||
ZEND_FE(openssl_digest, arginfo_openssl_digest)
|
||||
ZEND_FE(openssl_encrypt, arginfo_openssl_encrypt)
|
||||
ZEND_FE(openssl_decrypt, arginfo_openssl_decrypt)
|
||||
ZEND_FE(openssl_cipher_iv_length, arginfo_openssl_cipher_iv_length)
|
||||
ZEND_FE(openssl_dh_compute_key, arginfo_openssl_dh_compute_key)
|
||||
ZEND_FE(openssl_pkey_derive, arginfo_openssl_pkey_derive)
|
||||
ZEND_FE(openssl_random_pseudo_bytes, arginfo_openssl_random_pseudo_bytes)
|
||||
ZEND_FE(openssl_spki_new, arginfo_openssl_spki_new)
|
||||
ZEND_FE(openssl_spki_verify, arginfo_openssl_spki_verify)
|
||||
ZEND_FE(openssl_spki_export, arginfo_openssl_spki_export)
|
||||
ZEND_FE(openssl_spki_export_challenge, arginfo_openssl_spki_export_challenge)
|
||||
ZEND_FE(openssl_get_cert_locations, arginfo_openssl_get_cert_locations)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -109,61 +109,6 @@ PHP_MINFO_FUNCTION(openssl);
|
||||
PHP_GINIT_FUNCTION(openssl);
|
||||
PHP_GSHUTDOWN_FUNCTION(openssl);
|
||||
|
||||
PHP_FUNCTION(openssl_pkey_get_private);
|
||||
PHP_FUNCTION(openssl_pkey_get_public);
|
||||
PHP_FUNCTION(openssl_pkey_free);
|
||||
PHP_FUNCTION(openssl_pkey_new);
|
||||
PHP_FUNCTION(openssl_pkey_export);
|
||||
PHP_FUNCTION(openssl_pkey_export_to_file);
|
||||
PHP_FUNCTION(openssl_pkey_get_details);
|
||||
|
||||
PHP_FUNCTION(openssl_sign);
|
||||
PHP_FUNCTION(openssl_verify);
|
||||
PHP_FUNCTION(openssl_seal);
|
||||
PHP_FUNCTION(openssl_open);
|
||||
PHP_FUNCTION(openssl_private_encrypt);
|
||||
PHP_FUNCTION(openssl_private_decrypt);
|
||||
PHP_FUNCTION(openssl_public_encrypt);
|
||||
PHP_FUNCTION(openssl_public_decrypt);
|
||||
|
||||
PHP_FUNCTION(openssl_pbkdf2);
|
||||
|
||||
PHP_FUNCTION(openssl_pkcs7_verify);
|
||||
PHP_FUNCTION(openssl_pkcs7_decrypt);
|
||||
PHP_FUNCTION(openssl_pkcs7_sign);
|
||||
PHP_FUNCTION(openssl_pkcs7_encrypt);
|
||||
PHP_FUNCTION(openssl_pkcs7_read);
|
||||
|
||||
PHP_FUNCTION(openssl_error_string);
|
||||
|
||||
PHP_FUNCTION(openssl_x509_read);
|
||||
PHP_FUNCTION(openssl_x509_free);
|
||||
PHP_FUNCTION(openssl_x509_parse);
|
||||
PHP_FUNCTION(openssl_x509_checkpurpose);
|
||||
PHP_FUNCTION(openssl_x509_export);
|
||||
PHP_FUNCTION(openssl_x509_fingerprint);
|
||||
PHP_FUNCTION(openssl_x509_export_to_file);
|
||||
PHP_FUNCTION(openssl_x509_check_private_key);
|
||||
PHP_FUNCTION(openssl_x509_verify);
|
||||
|
||||
PHP_FUNCTION(openssl_pkcs12_export);
|
||||
PHP_FUNCTION(openssl_pkcs12_export_to_file);
|
||||
PHP_FUNCTION(openssl_pkcs12_read);
|
||||
|
||||
PHP_FUNCTION(openssl_csr_new);
|
||||
PHP_FUNCTION(openssl_csr_export);
|
||||
PHP_FUNCTION(openssl_csr_export_to_file);
|
||||
PHP_FUNCTION(openssl_csr_sign);
|
||||
PHP_FUNCTION(openssl_csr_get_subject);
|
||||
PHP_FUNCTION(openssl_csr_get_public_key);
|
||||
|
||||
PHP_FUNCTION(openssl_spki_new);
|
||||
PHP_FUNCTION(openssl_spki_verify);
|
||||
PHP_FUNCTION(openssl_spki_export);
|
||||
PHP_FUNCTION(openssl_spki_export_challenge);
|
||||
|
||||
PHP_FUNCTION(openssl_get_cert_locations);
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#define PHP_OPENSSL_BIO_MODE_R(flags) (((flags) & PKCS7_BINARY) ? "rb" : "r")
|
||||
#define PHP_OPENSSL_BIO_MODE_W(flags) (((flags) & PKCS7_BINARY) ? "wb" : "w")
|
||||
|
||||
@@ -1477,7 +1477,7 @@ error:
|
||||
|
||||
/* {{{ proto int preg_match(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]])
|
||||
Perform a Perl-style regular expression match */
|
||||
static PHP_FUNCTION(preg_match)
|
||||
PHP_FUNCTION(preg_match)
|
||||
{
|
||||
php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
|
||||
}
|
||||
@@ -1485,7 +1485,7 @@ static PHP_FUNCTION(preg_match)
|
||||
|
||||
/* {{{ proto int preg_match_all(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]])
|
||||
Perform a Perl-style global regular expression match */
|
||||
static PHP_FUNCTION(preg_match_all)
|
||||
PHP_FUNCTION(preg_match_all)
|
||||
{
|
||||
php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
|
||||
}
|
||||
@@ -2366,7 +2366,7 @@ static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, int is_filter)
|
||||
|
||||
/* {{{ proto mixed preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])
|
||||
Perform Perl-style regular expression replacement. */
|
||||
static PHP_FUNCTION(preg_replace)
|
||||
PHP_FUNCTION(preg_replace)
|
||||
{
|
||||
preg_replace_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
|
||||
}
|
||||
@@ -2374,7 +2374,7 @@ static PHP_FUNCTION(preg_replace)
|
||||
|
||||
/* {{{ proto mixed preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, int &count]])
|
||||
Perform Perl-style regular expression replacement using replacement callback. */
|
||||
static PHP_FUNCTION(preg_replace_callback)
|
||||
PHP_FUNCTION(preg_replace_callback)
|
||||
{
|
||||
zval *regex, *replace, *subject, *zcount = NULL;
|
||||
zend_long limit = -1, flags = 0;
|
||||
@@ -2414,7 +2414,7 @@ static PHP_FUNCTION(preg_replace_callback)
|
||||
|
||||
/* {{{ proto mixed preg_replace_callback_array(array pattern, mixed subject [, int limit [, int &count]])
|
||||
Perform Perl-style regular expression replacement using replacement callback. */
|
||||
static PHP_FUNCTION(preg_replace_callback_array)
|
||||
PHP_FUNCTION(preg_replace_callback_array)
|
||||
{
|
||||
zval regex, zv, *replace, *subject, *pattern, *zcount = NULL;
|
||||
zend_long limit = -1, flags = 0;
|
||||
@@ -2482,7 +2482,7 @@ static PHP_FUNCTION(preg_replace_callback_array)
|
||||
|
||||
/* {{{ proto mixed preg_filter(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])
|
||||
Perform Perl-style regular expression replacement and only return matches. */
|
||||
static PHP_FUNCTION(preg_filter)
|
||||
PHP_FUNCTION(preg_filter)
|
||||
{
|
||||
preg_replace_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
|
||||
}
|
||||
@@ -2490,7 +2490,7 @@ static PHP_FUNCTION(preg_filter)
|
||||
|
||||
/* {{{ proto array preg_split(string pattern, string subject [, int limit [, int flags]])
|
||||
Split string into an array using a perl-style regular expression as a delimiter */
|
||||
static PHP_FUNCTION(preg_split)
|
||||
PHP_FUNCTION(preg_split)
|
||||
{
|
||||
zend_string *regex; /* Regular expression */
|
||||
zend_string *subject; /* String to match against */
|
||||
@@ -2711,7 +2711,7 @@ last:
|
||||
|
||||
/* {{{ proto string preg_quote(string str [, string delim_char])
|
||||
Quote regular expression characters plus an optional character */
|
||||
static PHP_FUNCTION(preg_quote)
|
||||
PHP_FUNCTION(preg_quote)
|
||||
{
|
||||
zend_string *str; /* Input string argument */
|
||||
zend_string *delim = NULL; /* Additional delimiter argument */
|
||||
@@ -2848,7 +2848,7 @@ static PHP_FUNCTION(preg_quote)
|
||||
|
||||
/* {{{ proto array preg_grep(string regex, array input [, int flags])
|
||||
Searches array and returns entries which match regex */
|
||||
static PHP_FUNCTION(preg_grep)
|
||||
PHP_FUNCTION(preg_grep)
|
||||
{
|
||||
zend_string *regex; /* Regular expression */
|
||||
zval *input; /* Input array */
|
||||
@@ -2965,7 +2965,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return
|
||||
|
||||
/* {{{ proto int preg_last_error()
|
||||
Returns the error code of the last regexp execution. */
|
||||
static PHP_FUNCTION(preg_last_error)
|
||||
PHP_FUNCTION(preg_last_error)
|
||||
{
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
@@ -2975,7 +2975,7 @@ static PHP_FUNCTION(preg_last_error)
|
||||
|
||||
/* {{{ proto string preg_last_error_msg()
|
||||
Returns the error message of the last regexp execution. */
|
||||
static PHP_FUNCTION(preg_last_error_msg)
|
||||
PHP_FUNCTION(preg_last_error_msg)
|
||||
{
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
@@ -2985,25 +2985,10 @@ static PHP_FUNCTION(preg_last_error_msg)
|
||||
|
||||
/* {{{ module definition structures */
|
||||
|
||||
static const zend_function_entry pcre_functions[] = {
|
||||
PHP_FE(preg_match, arginfo_preg_match)
|
||||
PHP_FE(preg_match_all, arginfo_preg_match_all)
|
||||
PHP_FE(preg_replace, arginfo_preg_replace)
|
||||
PHP_FE(preg_replace_callback, arginfo_preg_replace_callback)
|
||||
PHP_FE(preg_replace_callback_array, arginfo_preg_replace_callback_array)
|
||||
PHP_FE(preg_filter, arginfo_preg_replace)
|
||||
PHP_FE(preg_split, arginfo_preg_split)
|
||||
PHP_FE(preg_quote, arginfo_preg_quote)
|
||||
PHP_FE(preg_grep, arginfo_preg_grep)
|
||||
PHP_FE(preg_last_error, arginfo_preg_last_error)
|
||||
PHP_FE(preg_last_error_msg, arginfo_preg_last_error_msg)
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
zend_module_entry pcre_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"pcre",
|
||||
pcre_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(pcre),
|
||||
PHP_MSHUTDOWN(pcre),
|
||||
PHP_RINIT(pcre),
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function preg_match(string $pattern, string $subject, &$subpatterns = null, int $flags = 0, int $offset = 0): int|false {}
|
||||
|
||||
function preg_match_all(string $pattern, string $subject, &$subpatterns = null, int $flags = 0, int $offset = 0): int|false|null {}
|
||||
|
||||
@@ -66,3 +66,32 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_preg_last_error_msg, 0, 0, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(preg_match);
|
||||
ZEND_FUNCTION(preg_match_all);
|
||||
ZEND_FUNCTION(preg_replace);
|
||||
ZEND_FUNCTION(preg_filter);
|
||||
ZEND_FUNCTION(preg_replace_callback);
|
||||
ZEND_FUNCTION(preg_replace_callback_array);
|
||||
ZEND_FUNCTION(preg_split);
|
||||
ZEND_FUNCTION(preg_quote);
|
||||
ZEND_FUNCTION(preg_grep);
|
||||
ZEND_FUNCTION(preg_last_error);
|
||||
ZEND_FUNCTION(preg_last_error_msg);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(preg_match, arginfo_preg_match)
|
||||
ZEND_FE(preg_match_all, arginfo_preg_match_all)
|
||||
ZEND_FE(preg_replace, arginfo_preg_replace)
|
||||
ZEND_FE(preg_filter, arginfo_preg_filter)
|
||||
ZEND_FE(preg_replace_callback, arginfo_preg_replace_callback)
|
||||
ZEND_FE(preg_replace_callback_array, arginfo_preg_replace_callback_array)
|
||||
ZEND_FE(preg_split, arginfo_preg_split)
|
||||
ZEND_FE(preg_quote, arginfo_preg_quote)
|
||||
ZEND_FE(preg_grep, arginfo_preg_grep)
|
||||
ZEND_FE(preg_last_error, arginfo_preg_last_error)
|
||||
ZEND_FE(preg_last_error_msg, arginfo_preg_last_error_msg)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -95,13 +95,6 @@ PHP_FUNCTION(pdo_drivers)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ pdo_functions[] */
|
||||
const zend_function_entry pdo_functions[] = {
|
||||
PHP_FE(pdo_drivers, arginfo_pdo_drivers)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ pdo_functions[] */
|
||||
static const zend_module_dep pdo_deps[] = {
|
||||
ZEND_MOD_REQUIRED("spl")
|
||||
@@ -114,7 +107,7 @@ zend_module_entry pdo_module_entry = {
|
||||
STANDARD_MODULE_HEADER_EX, NULL,
|
||||
pdo_deps,
|
||||
"PDO",
|
||||
pdo_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(pdo),
|
||||
PHP_MSHUTDOWN(pdo),
|
||||
NULL,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function pdo_drivers(): array {}
|
||||
|
||||
@@ -2,3 +2,12 @@
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pdo_drivers, 0, 0, IS_ARRAY, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(pdo_drivers);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(pdo_drivers, arginfo_pdo_drivers)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -32,93 +32,6 @@ extern zend_module_entry posix_module_entry;
|
||||
#include "php_version.h"
|
||||
#define PHP_POSIX_VERSION PHP_VERSION
|
||||
|
||||
/* POSIX.1, 3.3 */
|
||||
PHP_FUNCTION(posix_kill);
|
||||
|
||||
/* POSIX.1, 4.1 */
|
||||
PHP_FUNCTION(posix_getpid);
|
||||
PHP_FUNCTION(posix_getppid);
|
||||
|
||||
/* POSIX.1, 4.2 */
|
||||
PHP_FUNCTION(posix_getuid);
|
||||
PHP_FUNCTION(posix_getgid);
|
||||
PHP_FUNCTION(posix_geteuid);
|
||||
PHP_FUNCTION(posix_getegid);
|
||||
PHP_FUNCTION(posix_setuid);
|
||||
PHP_FUNCTION(posix_setgid);
|
||||
#ifdef HAVE_SETEUID
|
||||
PHP_FUNCTION(posix_seteuid);
|
||||
#endif
|
||||
#ifdef HAVE_SETEGID
|
||||
PHP_FUNCTION(posix_setegid);
|
||||
#endif
|
||||
#ifdef HAVE_GETGROUPS
|
||||
PHP_FUNCTION(posix_getgroups);
|
||||
#endif
|
||||
#ifdef HAVE_GETLOGIN
|
||||
PHP_FUNCTION(posix_getlogin);
|
||||
#endif
|
||||
|
||||
/* POSIX.1, 4.3 */
|
||||
PHP_FUNCTION(posix_getpgrp);
|
||||
#ifdef HAVE_SETSID
|
||||
PHP_FUNCTION(posix_setsid);
|
||||
#endif
|
||||
PHP_FUNCTION(posix_setpgid);
|
||||
/* Non-Posix functions which are common */
|
||||
#ifdef HAVE_GETPGID
|
||||
PHP_FUNCTION(posix_getpgid);
|
||||
#endif
|
||||
#ifdef HAVE_GETSID
|
||||
PHP_FUNCTION(posix_getsid);
|
||||
#endif
|
||||
|
||||
/* POSIX.1, 4.4 */
|
||||
PHP_FUNCTION(posix_uname);
|
||||
PHP_FUNCTION(posix_times);
|
||||
|
||||
/* POSIX.1, 4.5 */
|
||||
#ifdef HAVE_CTERMID
|
||||
PHP_FUNCTION(posix_ctermid);
|
||||
#endif
|
||||
PHP_FUNCTION(posix_ttyname);
|
||||
PHP_FUNCTION(posix_isatty);
|
||||
|
||||
/* POSIX.1, 5.2 */
|
||||
PHP_FUNCTION(posix_getcwd);
|
||||
|
||||
/* POSIX.1, 5.4 */
|
||||
#ifdef HAVE_MKFIFO
|
||||
PHP_FUNCTION(posix_mkfifo);
|
||||
#endif
|
||||
#ifdef HAVE_MKNOD
|
||||
PHP_FUNCTION(posix_mknod);
|
||||
#endif
|
||||
|
||||
/* POSIX.1, 5.6 */
|
||||
PHP_FUNCTION(posix_access);
|
||||
|
||||
/* POSIX.1, 9.2 */
|
||||
PHP_FUNCTION(posix_getgrnam);
|
||||
PHP_FUNCTION(posix_getgrgid);
|
||||
PHP_FUNCTION(posix_getpwnam);
|
||||
PHP_FUNCTION(posix_getpwuid);
|
||||
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
PHP_FUNCTION(posix_getrlimit);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SETRLIMIT
|
||||
PHP_FUNCTION(posix_setrlimit);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_INITGROUPS
|
||||
PHP_FUNCTION(posix_initgroups);
|
||||
#endif
|
||||
|
||||
PHP_FUNCTION(posix_get_last_error);
|
||||
PHP_FUNCTION(posix_strerror);
|
||||
|
||||
ZEND_BEGIN_MODULE_GLOBALS(posix)
|
||||
int last_error;
|
||||
ZEND_END_MODULE_GLOBALS(posix)
|
||||
|
||||
@@ -50,100 +50,6 @@
|
||||
ZEND_DECLARE_MODULE_GLOBALS(posix)
|
||||
static PHP_MINFO_FUNCTION(posix);
|
||||
|
||||
/* {{{ posix_functions[]
|
||||
*/
|
||||
static const zend_function_entry posix_functions[] = {
|
||||
/* POSIX.1, 3.3 */
|
||||
PHP_FE(posix_kill, arginfo_posix_kill)
|
||||
|
||||
/* POSIX.1, 4.1 */
|
||||
PHP_FE(posix_getpid, arginfo_posix_getpid)
|
||||
PHP_FE(posix_getppid, arginfo_posix_getppid)
|
||||
|
||||
/* POSIX.1, 4.2 */
|
||||
PHP_FE(posix_getuid, arginfo_posix_getuid)
|
||||
PHP_FE(posix_setuid, arginfo_posix_setuid)
|
||||
PHP_FE(posix_geteuid, arginfo_posix_geteuid)
|
||||
#ifdef HAVE_SETEUID
|
||||
PHP_FE(posix_seteuid, arginfo_posix_seteuid)
|
||||
#endif
|
||||
PHP_FE(posix_getgid, arginfo_posix_getgid)
|
||||
PHP_FE(posix_setgid, arginfo_posix_setgid)
|
||||
PHP_FE(posix_getegid, arginfo_posix_getegid)
|
||||
#ifdef HAVE_SETEGID
|
||||
PHP_FE(posix_setegid, arginfo_posix_setegid)
|
||||
#endif
|
||||
#ifdef HAVE_GETGROUPS
|
||||
PHP_FE(posix_getgroups, arginfo_posix_getgroups)
|
||||
#endif
|
||||
#ifdef HAVE_GETLOGIN
|
||||
PHP_FE(posix_getlogin, arginfo_posix_getlogin)
|
||||
#endif
|
||||
|
||||
/* POSIX.1, 4.3 */
|
||||
PHP_FE(posix_getpgrp, arginfo_posix_getpgrp)
|
||||
#ifdef HAVE_SETSID
|
||||
PHP_FE(posix_setsid, arginfo_posix_setsid)
|
||||
#endif
|
||||
PHP_FE(posix_setpgid, arginfo_posix_setpgid)
|
||||
/* Non-Posix functions which are common */
|
||||
#ifdef HAVE_GETPGID
|
||||
PHP_FE(posix_getpgid, arginfo_posix_getpgid)
|
||||
#endif /* HAVE_GETPGID */
|
||||
#ifdef HAVE_GETSID
|
||||
PHP_FE(posix_getsid, arginfo_posix_getsid)
|
||||
#endif /* HAVE_GETSID */
|
||||
|
||||
/* POSIX.1, 4.4 */
|
||||
PHP_FE(posix_uname, arginfo_posix_uname)
|
||||
|
||||
/* POSIX.1, 4.5 */
|
||||
PHP_FE(posix_times, arginfo_posix_times)
|
||||
|
||||
/* POSIX.1, 4.7 */
|
||||
#ifdef HAVE_CTERMID
|
||||
PHP_FE(posix_ctermid, arginfo_posix_ctermid)
|
||||
#endif
|
||||
PHP_FE(posix_ttyname, arginfo_posix_ttyname)
|
||||
PHP_FE(posix_isatty, arginfo_posix_isatty)
|
||||
|
||||
/* POSIX.1, 5.2 */
|
||||
PHP_FE(posix_getcwd, arginfo_posix_getcwd)
|
||||
|
||||
/* POSIX.1, 5.4 */
|
||||
#ifdef HAVE_MKFIFO
|
||||
PHP_FE(posix_mkfifo, arginfo_posix_mkfifo)
|
||||
#endif
|
||||
#ifdef HAVE_MKNOD
|
||||
PHP_FE(posix_mknod, arginfo_posix_mknod)
|
||||
#endif
|
||||
|
||||
/* POSIX.1, 5.6 */
|
||||
PHP_FE(posix_access, arginfo_posix_access)
|
||||
/* POSIX.1, 9.2 */
|
||||
PHP_FE(posix_getgrnam, arginfo_posix_getgrnam)
|
||||
PHP_FE(posix_getgrgid, arginfo_posix_getgrgid)
|
||||
PHP_FE(posix_getpwnam, arginfo_posix_getpwnam)
|
||||
PHP_FE(posix_getpwuid, arginfo_posix_getpwuid)
|
||||
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
PHP_FE(posix_getrlimit, arginfo_posix_getrlimit)
|
||||
#endif
|
||||
#ifdef HAVE_SETRLIMIT
|
||||
PHP_FE(posix_setrlimit, arginfo_posix_setrlimit)
|
||||
#endif
|
||||
|
||||
PHP_FE(posix_get_last_error, arginfo_posix_get_last_error)
|
||||
PHP_FALIAS(posix_errno, posix_get_last_error, arginfo_posix_errno)
|
||||
PHP_FE(posix_strerror, arginfo_posix_strerror)
|
||||
#ifdef HAVE_INITGROUPS
|
||||
PHP_FE(posix_initgroups, arginfo_posix_initgroups)
|
||||
#endif
|
||||
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_MINFO_FUNCTION
|
||||
*/
|
||||
static PHP_MINFO_FUNCTION(posix)
|
||||
@@ -246,7 +152,7 @@ static PHP_MINIT_FUNCTION(posix)
|
||||
zend_module_entry posix_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"posix",
|
||||
posix_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(posix),
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function posix_kill(int $pid, int $sig): bool {}
|
||||
|
||||
function posix_getpid(): int {}
|
||||
|
||||
@@ -157,3 +157,135 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_initgroups, 0, 2, _IS_BOOL
|
||||
ZEND_ARG_TYPE_INFO(0, base_group_id, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_FUNCTION(posix_kill);
|
||||
ZEND_FUNCTION(posix_getpid);
|
||||
ZEND_FUNCTION(posix_getppid);
|
||||
ZEND_FUNCTION(posix_getuid);
|
||||
ZEND_FUNCTION(posix_setuid);
|
||||
ZEND_FUNCTION(posix_geteuid);
|
||||
#if defined(HAVE_SETEUID)
|
||||
ZEND_FUNCTION(posix_seteuid);
|
||||
#endif
|
||||
ZEND_FUNCTION(posix_getgid);
|
||||
ZEND_FUNCTION(posix_setgid);
|
||||
ZEND_FUNCTION(posix_getegid);
|
||||
#if defined(HAVE_SETEGID)
|
||||
ZEND_FUNCTION(posix_setegid);
|
||||
#endif
|
||||
#if defined(HAVE_GETGROUPS)
|
||||
ZEND_FUNCTION(posix_getgroups);
|
||||
#endif
|
||||
#if defined(HAVE_GETLOGIN)
|
||||
ZEND_FUNCTION(posix_getlogin);
|
||||
#endif
|
||||
ZEND_FUNCTION(posix_getpgrp);
|
||||
#if defined(HAVE_SETSID)
|
||||
ZEND_FUNCTION(posix_setsid);
|
||||
#endif
|
||||
ZEND_FUNCTION(posix_setpgid);
|
||||
#if defined(HAVE_GETPGID)
|
||||
ZEND_FUNCTION(posix_getpgid);
|
||||
#endif
|
||||
#if defined(HAVE_GETSID)
|
||||
ZEND_FUNCTION(posix_getsid);
|
||||
#endif
|
||||
ZEND_FUNCTION(posix_uname);
|
||||
ZEND_FUNCTION(posix_times);
|
||||
#if defined(HAVE_CTERMID)
|
||||
ZEND_FUNCTION(posix_ctermid);
|
||||
#endif
|
||||
ZEND_FUNCTION(posix_ttyname);
|
||||
ZEND_FUNCTION(posix_isatty);
|
||||
ZEND_FUNCTION(posix_getcwd);
|
||||
#if defined(HAVE_MKFIFO)
|
||||
ZEND_FUNCTION(posix_mkfifo);
|
||||
#endif
|
||||
#if defined(HAVE_MKNOD)
|
||||
ZEND_FUNCTION(posix_mknod);
|
||||
#endif
|
||||
ZEND_FUNCTION(posix_access);
|
||||
ZEND_FUNCTION(posix_getgrnam);
|
||||
ZEND_FUNCTION(posix_getgrgid);
|
||||
ZEND_FUNCTION(posix_getpwnam);
|
||||
ZEND_FUNCTION(posix_getpwuid);
|
||||
#if defined(HAVE_GETRLIMIT)
|
||||
ZEND_FUNCTION(posix_getrlimit);
|
||||
#endif
|
||||
#if defined(HAVE_SETRLIMIT)
|
||||
ZEND_FUNCTION(posix_setrlimit);
|
||||
#endif
|
||||
ZEND_FUNCTION(posix_get_last_error);
|
||||
ZEND_FUNCTION(posix_strerror);
|
||||
#if defined(HAVE_INITGROUPS)
|
||||
ZEND_FUNCTION(posix_initgroups);
|
||||
#endif
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(posix_kill, arginfo_posix_kill)
|
||||
ZEND_FE(posix_getpid, arginfo_posix_getpid)
|
||||
ZEND_FE(posix_getppid, arginfo_posix_getppid)
|
||||
ZEND_FE(posix_getuid, arginfo_posix_getuid)
|
||||
ZEND_FE(posix_setuid, arginfo_posix_setuid)
|
||||
ZEND_FE(posix_geteuid, arginfo_posix_geteuid)
|
||||
#if defined(HAVE_SETEUID)
|
||||
ZEND_FE(posix_seteuid, arginfo_posix_seteuid)
|
||||
#endif
|
||||
ZEND_FE(posix_getgid, arginfo_posix_getgid)
|
||||
ZEND_FE(posix_setgid, arginfo_posix_setgid)
|
||||
ZEND_FE(posix_getegid, arginfo_posix_getegid)
|
||||
#if defined(HAVE_SETEGID)
|
||||
ZEND_FE(posix_setegid, arginfo_posix_setegid)
|
||||
#endif
|
||||
#if defined(HAVE_GETGROUPS)
|
||||
ZEND_FE(posix_getgroups, arginfo_posix_getgroups)
|
||||
#endif
|
||||
#if defined(HAVE_GETLOGIN)
|
||||
ZEND_FE(posix_getlogin, arginfo_posix_getlogin)
|
||||
#endif
|
||||
ZEND_FE(posix_getpgrp, arginfo_posix_getpgrp)
|
||||
#if defined(HAVE_SETSID)
|
||||
ZEND_FE(posix_setsid, arginfo_posix_setsid)
|
||||
#endif
|
||||
ZEND_FE(posix_setpgid, arginfo_posix_setpgid)
|
||||
#if defined(HAVE_GETPGID)
|
||||
ZEND_FE(posix_getpgid, arginfo_posix_getpgid)
|
||||
#endif
|
||||
#if defined(HAVE_GETSID)
|
||||
ZEND_FE(posix_getsid, arginfo_posix_getsid)
|
||||
#endif
|
||||
ZEND_FE(posix_uname, arginfo_posix_uname)
|
||||
ZEND_FE(posix_times, arginfo_posix_times)
|
||||
#if defined(HAVE_CTERMID)
|
||||
ZEND_FE(posix_ctermid, arginfo_posix_ctermid)
|
||||
#endif
|
||||
ZEND_FE(posix_ttyname, arginfo_posix_ttyname)
|
||||
ZEND_FE(posix_isatty, arginfo_posix_isatty)
|
||||
ZEND_FE(posix_getcwd, arginfo_posix_getcwd)
|
||||
#if defined(HAVE_MKFIFO)
|
||||
ZEND_FE(posix_mkfifo, arginfo_posix_mkfifo)
|
||||
#endif
|
||||
#if defined(HAVE_MKNOD)
|
||||
ZEND_FE(posix_mknod, arginfo_posix_mknod)
|
||||
#endif
|
||||
ZEND_FE(posix_access, arginfo_posix_access)
|
||||
ZEND_FE(posix_getgrnam, arginfo_posix_getgrnam)
|
||||
ZEND_FE(posix_getgrgid, arginfo_posix_getgrgid)
|
||||
ZEND_FE(posix_getpwnam, arginfo_posix_getpwnam)
|
||||
ZEND_FE(posix_getpwuid, arginfo_posix_getpwuid)
|
||||
#if defined(HAVE_GETRLIMIT)
|
||||
ZEND_FE(posix_getrlimit, arginfo_posix_getrlimit)
|
||||
#endif
|
||||
#if defined(HAVE_SETRLIMIT)
|
||||
ZEND_FE(posix_setrlimit, arginfo_posix_setrlimit)
|
||||
#endif
|
||||
ZEND_FE(posix_get_last_error, arginfo_posix_get_last_error)
|
||||
ZEND_FALIAS(posix_errno, posix_get_last_error, arginfo_posix_errno)
|
||||
ZEND_FE(posix_strerror, arginfo_posix_strerror)
|
||||
#if defined(HAVE_INITGROUPS)
|
||||
ZEND_FE(posix_initgroups, arginfo_posix_initgroups)
|
||||
#endif
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -47,57 +47,12 @@
|
||||
|
||||
static PHP_MINIT_FUNCTION(pspell);
|
||||
static PHP_MINFO_FUNCTION(pspell);
|
||||
static PHP_FUNCTION(pspell_new);
|
||||
static PHP_FUNCTION(pspell_new_personal);
|
||||
static PHP_FUNCTION(pspell_new_config);
|
||||
static PHP_FUNCTION(pspell_check);
|
||||
static PHP_FUNCTION(pspell_suggest);
|
||||
static PHP_FUNCTION(pspell_store_replacement);
|
||||
static PHP_FUNCTION(pspell_add_to_personal);
|
||||
static PHP_FUNCTION(pspell_add_to_session);
|
||||
static PHP_FUNCTION(pspell_clear_session);
|
||||
static PHP_FUNCTION(pspell_save_wordlist);
|
||||
static PHP_FUNCTION(pspell_config_create);
|
||||
static PHP_FUNCTION(pspell_config_runtogether);
|
||||
static PHP_FUNCTION(pspell_config_mode);
|
||||
static PHP_FUNCTION(pspell_config_ignore);
|
||||
static PHP_FUNCTION(pspell_config_personal);
|
||||
static PHP_FUNCTION(pspell_config_dict_dir);
|
||||
static PHP_FUNCTION(pspell_config_data_dir);
|
||||
static PHP_FUNCTION(pspell_config_repl);
|
||||
static PHP_FUNCTION(pspell_config_save_repl);
|
||||
|
||||
/* {{{ pspell_functions[]
|
||||
*/
|
||||
static const zend_function_entry pspell_functions[] = {
|
||||
PHP_FE(pspell_new, arginfo_pspell_new)
|
||||
PHP_FE(pspell_new_personal, arginfo_pspell_new_personal)
|
||||
PHP_FE(pspell_new_config, arginfo_pspell_new_config)
|
||||
PHP_FE(pspell_check, arginfo_pspell_check)
|
||||
PHP_FE(pspell_suggest, arginfo_pspell_suggest)
|
||||
PHP_FE(pspell_store_replacement, arginfo_pspell_store_replacement)
|
||||
PHP_FE(pspell_add_to_personal, arginfo_pspell_add_to_personal)
|
||||
PHP_FE(pspell_add_to_session, arginfo_pspell_add_to_session)
|
||||
PHP_FE(pspell_clear_session, arginfo_pspell_clear_session)
|
||||
PHP_FE(pspell_save_wordlist, arginfo_pspell_save_wordlist)
|
||||
PHP_FE(pspell_config_create, arginfo_pspell_config_create)
|
||||
PHP_FE(pspell_config_runtogether, arginfo_pspell_config_runtogether)
|
||||
PHP_FE(pspell_config_mode, arginfo_pspell_config_mode)
|
||||
PHP_FE(pspell_config_ignore, arginfo_pspell_config_ignore)
|
||||
PHP_FE(pspell_config_personal, arginfo_pspell_config_personal)
|
||||
PHP_FE(pspell_config_dict_dir, arginfo_pspell_config_dict_dir)
|
||||
PHP_FE(pspell_config_data_dir, arginfo_pspell_config_data_dir)
|
||||
PHP_FE(pspell_config_repl, arginfo_pspell_config_repl)
|
||||
PHP_FE(pspell_config_save_repl, arginfo_pspell_config_save_repl)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
static int le_pspell, le_pspell_config;
|
||||
|
||||
zend_module_entry pspell_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"pspell", pspell_functions, PHP_MINIT(pspell), NULL, NULL, NULL, PHP_MINFO(pspell), PHP_PSPELL_VERSION, STANDARD_MODULE_PROPERTIES
|
||||
"pspell", ext_functions, PHP_MINIT(pspell), NULL, NULL, NULL, PHP_MINFO(pspell), PHP_PSPELL_VERSION, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_PSPELL
|
||||
@@ -152,7 +107,7 @@ static PHP_MINIT_FUNCTION(pspell)
|
||||
|
||||
/* {{{ proto int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])
|
||||
Load a dictionary */
|
||||
static PHP_FUNCTION(pspell_new)
|
||||
PHP_FUNCTION(pspell_new)
|
||||
{
|
||||
char *language, *spelling = NULL, *jargon = NULL, *encoding = NULL;
|
||||
size_t language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0;
|
||||
@@ -249,7 +204,7 @@ static PHP_FUNCTION(pspell_new)
|
||||
|
||||
/* {{{ proto int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]])
|
||||
Load a dictionary with a personal wordlist*/
|
||||
static PHP_FUNCTION(pspell_new_personal)
|
||||
PHP_FUNCTION(pspell_new_personal)
|
||||
{
|
||||
char *personal, *language, *spelling = NULL, *jargon = NULL, *encoding = NULL;
|
||||
size_t personal_len, language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0;
|
||||
@@ -354,7 +309,7 @@ static PHP_FUNCTION(pspell_new_personal)
|
||||
|
||||
/* {{{ proto int pspell_new_config(int config)
|
||||
Load a dictionary based on the given config */
|
||||
static PHP_FUNCTION(pspell_new_config)
|
||||
PHP_FUNCTION(pspell_new_config)
|
||||
{
|
||||
zend_long conf;
|
||||
zval *ind;
|
||||
@@ -384,7 +339,7 @@ static PHP_FUNCTION(pspell_new_config)
|
||||
|
||||
/* {{{ proto bool pspell_check(int pspell, string word)
|
||||
Returns true if word is valid */
|
||||
static PHP_FUNCTION(pspell_check)
|
||||
PHP_FUNCTION(pspell_check)
|
||||
{
|
||||
size_t word_len;
|
||||
zend_long scin;
|
||||
@@ -407,7 +362,7 @@ static PHP_FUNCTION(pspell_check)
|
||||
|
||||
/* {{{ proto array pspell_suggest(int pspell, string word)
|
||||
Returns array of suggestions */
|
||||
static PHP_FUNCTION(pspell_suggest)
|
||||
PHP_FUNCTION(pspell_suggest)
|
||||
{
|
||||
zend_long scin;
|
||||
char *word;
|
||||
@@ -440,7 +395,7 @@ static PHP_FUNCTION(pspell_suggest)
|
||||
|
||||
/* {{{ proto bool pspell_store_replacement(int pspell, string misspell, string correct)
|
||||
Notify the dictionary of a user-selected replacement */
|
||||
static PHP_FUNCTION(pspell_store_replacement)
|
||||
PHP_FUNCTION(pspell_store_replacement)
|
||||
{
|
||||
size_t miss_len, corr_len;
|
||||
zend_long scin;
|
||||
@@ -465,7 +420,7 @@ static PHP_FUNCTION(pspell_store_replacement)
|
||||
|
||||
/* {{{ proto bool pspell_add_to_personal(int pspell, string word)
|
||||
Adds a word to a personal list */
|
||||
static PHP_FUNCTION(pspell_add_to_personal)
|
||||
PHP_FUNCTION(pspell_add_to_personal)
|
||||
{
|
||||
size_t word_len;
|
||||
zend_long scin;
|
||||
@@ -495,7 +450,7 @@ static PHP_FUNCTION(pspell_add_to_personal)
|
||||
|
||||
/* {{{ proto bool pspell_add_to_session(int pspell, string word)
|
||||
Adds a word to the current session */
|
||||
static PHP_FUNCTION(pspell_add_to_session)
|
||||
PHP_FUNCTION(pspell_add_to_session)
|
||||
{
|
||||
size_t word_len;
|
||||
zend_long scin;
|
||||
@@ -525,7 +480,7 @@ static PHP_FUNCTION(pspell_add_to_session)
|
||||
|
||||
/* {{{ proto bool pspell_clear_session(int pspell)
|
||||
Clears the current session */
|
||||
static PHP_FUNCTION(pspell_clear_session)
|
||||
PHP_FUNCTION(pspell_clear_session)
|
||||
{
|
||||
zend_long scin;
|
||||
PspellManager *manager;
|
||||
@@ -548,7 +503,7 @@ static PHP_FUNCTION(pspell_clear_session)
|
||||
|
||||
/* {{{ proto bool pspell_save_wordlist(int pspell)
|
||||
Saves the current (personal) wordlist */
|
||||
static PHP_FUNCTION(pspell_save_wordlist)
|
||||
PHP_FUNCTION(pspell_save_wordlist)
|
||||
{
|
||||
zend_long scin;
|
||||
PspellManager *manager;
|
||||
@@ -573,7 +528,7 @@ static PHP_FUNCTION(pspell_save_wordlist)
|
||||
|
||||
/* {{{ proto int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]])
|
||||
Create a new config to be used later to create a manager */
|
||||
static PHP_FUNCTION(pspell_config_create)
|
||||
PHP_FUNCTION(pspell_config_create)
|
||||
{
|
||||
char *language, *spelling = NULL, *jargon = NULL, *encoding = NULL;
|
||||
size_t language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0;
|
||||
@@ -641,7 +596,7 @@ static PHP_FUNCTION(pspell_config_create)
|
||||
|
||||
/* {{{ proto bool pspell_config_runtogether(int conf, bool runtogether)
|
||||
Consider run-together words as valid components */
|
||||
static PHP_FUNCTION(pspell_config_runtogether)
|
||||
PHP_FUNCTION(pspell_config_runtogether)
|
||||
{
|
||||
zend_long conf;
|
||||
zend_bool runtogether;
|
||||
@@ -661,7 +616,7 @@ static PHP_FUNCTION(pspell_config_runtogether)
|
||||
|
||||
/* {{{ proto bool pspell_config_mode(int conf, int mode)
|
||||
Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS) */
|
||||
static PHP_FUNCTION(pspell_config_mode)
|
||||
PHP_FUNCTION(pspell_config_mode)
|
||||
{
|
||||
zend_long conf, mode;
|
||||
PspellConfig *config;
|
||||
@@ -687,7 +642,7 @@ static PHP_FUNCTION(pspell_config_mode)
|
||||
|
||||
/* {{{ proto bool pspell_config_ignore(int conf, int ignore)
|
||||
Ignore words <= n chars */
|
||||
static PHP_FUNCTION(pspell_config_ignore)
|
||||
PHP_FUNCTION(pspell_config_ignore)
|
||||
{
|
||||
char ignore_str[MAX_LENGTH_OF_LONG + 1];
|
||||
zend_long conf, ignore = 0L;
|
||||
@@ -730,7 +685,7 @@ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
|
||||
|
||||
/* {{{ proto bool pspell_config_personal(int conf, string personal)
|
||||
Use a personal dictionary for this config */
|
||||
static PHP_FUNCTION(pspell_config_personal)
|
||||
PHP_FUNCTION(pspell_config_personal)
|
||||
{
|
||||
pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "personal");
|
||||
}
|
||||
@@ -738,7 +693,7 @@ static PHP_FUNCTION(pspell_config_personal)
|
||||
|
||||
/* {{{ proto bool pspell_config_dict_dir(int conf, string directory)
|
||||
location of the main word list */
|
||||
static PHP_FUNCTION(pspell_config_dict_dir)
|
||||
PHP_FUNCTION(pspell_config_dict_dir)
|
||||
{
|
||||
pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "dict-dir");
|
||||
}
|
||||
@@ -746,7 +701,7 @@ static PHP_FUNCTION(pspell_config_dict_dir)
|
||||
|
||||
/* {{{ proto bool pspell_config_data_dir(int conf, string directory)
|
||||
location of language data files */
|
||||
static PHP_FUNCTION(pspell_config_data_dir)
|
||||
PHP_FUNCTION(pspell_config_data_dir)
|
||||
{
|
||||
pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "data-dir");
|
||||
}
|
||||
@@ -754,7 +709,7 @@ static PHP_FUNCTION(pspell_config_data_dir)
|
||||
|
||||
/* {{{ proto bool pspell_config_repl(int conf, string repl)
|
||||
Use a personal dictionary with replacement pairs for this config */
|
||||
static PHP_FUNCTION(pspell_config_repl)
|
||||
PHP_FUNCTION(pspell_config_repl)
|
||||
{
|
||||
zend_long conf;
|
||||
char *repl;
|
||||
@@ -781,7 +736,7 @@ static PHP_FUNCTION(pspell_config_repl)
|
||||
|
||||
/* {{{ proto bool pspell_config_save_repl(int conf, bool save)
|
||||
Save replacement pairs when personal list is saved for this config */
|
||||
static PHP_FUNCTION(pspell_config_save_repl)
|
||||
PHP_FUNCTION(pspell_config_save_repl)
|
||||
{
|
||||
zend_long conf;
|
||||
zend_bool save;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function pspell_new(string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN, int $mode = 0): int|false {}
|
||||
|
||||
function pspell_new_personal(string $personal, string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN, $mode = 0): int|false {}
|
||||
|
||||
@@ -90,3 +90,48 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_save_repl, 0, 2, _
|
||||
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, save, _IS_BOOL, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(pspell_new);
|
||||
ZEND_FUNCTION(pspell_new_personal);
|
||||
ZEND_FUNCTION(pspell_new_config);
|
||||
ZEND_FUNCTION(pspell_check);
|
||||
ZEND_FUNCTION(pspell_suggest);
|
||||
ZEND_FUNCTION(pspell_store_replacement);
|
||||
ZEND_FUNCTION(pspell_add_to_personal);
|
||||
ZEND_FUNCTION(pspell_add_to_session);
|
||||
ZEND_FUNCTION(pspell_clear_session);
|
||||
ZEND_FUNCTION(pspell_save_wordlist);
|
||||
ZEND_FUNCTION(pspell_config_create);
|
||||
ZEND_FUNCTION(pspell_config_runtogether);
|
||||
ZEND_FUNCTION(pspell_config_mode);
|
||||
ZEND_FUNCTION(pspell_config_ignore);
|
||||
ZEND_FUNCTION(pspell_config_personal);
|
||||
ZEND_FUNCTION(pspell_config_dict_dir);
|
||||
ZEND_FUNCTION(pspell_config_data_dir);
|
||||
ZEND_FUNCTION(pspell_config_repl);
|
||||
ZEND_FUNCTION(pspell_config_save_repl);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(pspell_new, arginfo_pspell_new)
|
||||
ZEND_FE(pspell_new_personal, arginfo_pspell_new_personal)
|
||||
ZEND_FE(pspell_new_config, arginfo_pspell_new_config)
|
||||
ZEND_FE(pspell_check, arginfo_pspell_check)
|
||||
ZEND_FE(pspell_suggest, arginfo_pspell_suggest)
|
||||
ZEND_FE(pspell_store_replacement, arginfo_pspell_store_replacement)
|
||||
ZEND_FE(pspell_add_to_personal, arginfo_pspell_add_to_personal)
|
||||
ZEND_FE(pspell_add_to_session, arginfo_pspell_add_to_session)
|
||||
ZEND_FE(pspell_clear_session, arginfo_pspell_clear_session)
|
||||
ZEND_FE(pspell_save_wordlist, arginfo_pspell_save_wordlist)
|
||||
ZEND_FE(pspell_config_create, arginfo_pspell_config_create)
|
||||
ZEND_FE(pspell_config_runtogether, arginfo_pspell_config_runtogether)
|
||||
ZEND_FE(pspell_config_mode, arginfo_pspell_config_mode)
|
||||
ZEND_FE(pspell_config_ignore, arginfo_pspell_config_ignore)
|
||||
ZEND_FE(pspell_config_personal, arginfo_pspell_config_personal)
|
||||
ZEND_FE(pspell_config_dict_dir, arginfo_pspell_config_dict_dir)
|
||||
ZEND_FE(pspell_config_data_dir, arginfo_pspell_config_data_dir)
|
||||
ZEND_FE(pspell_config_repl, arginfo_pspell_config_repl)
|
||||
ZEND_FE(pspell_config_save_repl, arginfo_pspell_config_save_repl)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -38,23 +38,7 @@
|
||||
#include <readline/history.h>
|
||||
#endif
|
||||
|
||||
PHP_FUNCTION(readline);
|
||||
PHP_FUNCTION(readline_add_history);
|
||||
PHP_FUNCTION(readline_info);
|
||||
PHP_FUNCTION(readline_clear_history);
|
||||
#ifdef HAVE_HISTORY_LIST
|
||||
PHP_FUNCTION(readline_list_history);
|
||||
#endif
|
||||
PHP_FUNCTION(readline_read_history);
|
||||
PHP_FUNCTION(readline_write_history);
|
||||
PHP_FUNCTION(readline_completion_function);
|
||||
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
PHP_FUNCTION(readline_callback_handler_install);
|
||||
PHP_FUNCTION(readline_callback_read_char);
|
||||
PHP_FUNCTION(readline_callback_handler_remove);
|
||||
PHP_FUNCTION(readline_redisplay);
|
||||
PHP_FUNCTION(readline_on_new_line);
|
||||
|
||||
static zval _prepped_callback;
|
||||
|
||||
@@ -71,33 +55,10 @@ PHP_MINFO_FUNCTION(readline);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ module stuff */
|
||||
static const zend_function_entry php_readline_functions[] = {
|
||||
PHP_FE(readline, arginfo_readline)
|
||||
PHP_FE(readline_info, arginfo_readline_info)
|
||||
PHP_FE(readline_add_history, arginfo_readline_add_history)
|
||||
PHP_FE(readline_clear_history, arginfo_readline_clear_history)
|
||||
#ifdef HAVE_HISTORY_LIST
|
||||
PHP_FE(readline_list_history, arginfo_readline_list_history)
|
||||
#endif
|
||||
PHP_FE(readline_read_history, arginfo_readline_read_history)
|
||||
PHP_FE(readline_write_history, arginfo_readline_write_history)
|
||||
PHP_FE(readline_completion_function,arginfo_readline_completion_function)
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
PHP_FE(readline_callback_handler_install, arginfo_readline_callback_handler_install)
|
||||
PHP_FE(readline_callback_read_char, arginfo_readline_callback_read_char)
|
||||
PHP_FE(readline_callback_handler_remove, arginfo_readline_callback_handler_remove)
|
||||
PHP_FE(readline_redisplay, arginfo_readline_redisplay)
|
||||
#endif
|
||||
#if HAVE_RL_ON_NEW_LINE
|
||||
PHP_FE(readline_on_new_line, arginfo_readline_on_new_line)
|
||||
#endif
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
zend_module_entry readline_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"readline",
|
||||
php_readline_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(readline),
|
||||
PHP_MSHUTDOWN(readline),
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function readline(?string $prompt = null): string|false {}
|
||||
|
||||
/** @return mixed */
|
||||
|
||||
@@ -56,3 +56,60 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_on_new_line, 0, 0, IS_VOID, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_FUNCTION(readline);
|
||||
ZEND_FUNCTION(readline_info);
|
||||
ZEND_FUNCTION(readline_add_history);
|
||||
ZEND_FUNCTION(readline_clear_history);
|
||||
#if defined(HAVE_HISTORY_LIST)
|
||||
ZEND_FUNCTION(readline_list_history);
|
||||
#endif
|
||||
ZEND_FUNCTION(readline_read_history);
|
||||
ZEND_FUNCTION(readline_write_history);
|
||||
ZEND_FUNCTION(readline_completion_function);
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
ZEND_FUNCTION(readline_callback_handler_install);
|
||||
#endif
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
ZEND_FUNCTION(readline_callback_read_char);
|
||||
#endif
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
ZEND_FUNCTION(readline_callback_handler_remove);
|
||||
#endif
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
ZEND_FUNCTION(readline_redisplay);
|
||||
#endif
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR && HAVE_RL_ON_NEW_LINE
|
||||
ZEND_FUNCTION(readline_on_new_line);
|
||||
#endif
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(readline, arginfo_readline)
|
||||
ZEND_FE(readline_info, arginfo_readline_info)
|
||||
ZEND_FE(readline_add_history, arginfo_readline_add_history)
|
||||
ZEND_FE(readline_clear_history, arginfo_readline_clear_history)
|
||||
#if defined(HAVE_HISTORY_LIST)
|
||||
ZEND_FE(readline_list_history, arginfo_readline_list_history)
|
||||
#endif
|
||||
ZEND_FE(readline_read_history, arginfo_readline_read_history)
|
||||
ZEND_FE(readline_write_history, arginfo_readline_write_history)
|
||||
ZEND_FE(readline_completion_function, arginfo_readline_completion_function)
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
ZEND_FE(readline_callback_handler_install, arginfo_readline_callback_handler_install)
|
||||
#endif
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
ZEND_FE(readline_callback_read_char, arginfo_readline_callback_read_char)
|
||||
#endif
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
ZEND_FE(readline_callback_handler_remove, arginfo_readline_callback_handler_remove)
|
||||
#endif
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR
|
||||
ZEND_FE(readline_redisplay, arginfo_readline_redisplay)
|
||||
#endif
|
||||
#if HAVE_RL_CALLBACK_READ_CHAR && HAVE_RL_ON_NEW_LINE
|
||||
ZEND_FE(readline_on_new_line, arginfo_readline_on_new_line)
|
||||
#endif
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -1666,7 +1666,7 @@ PHPAPI void session_adapt_url(const char *url, size_t urllen, char **new, size_t
|
||||
/* {{{ proto bool session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]])
|
||||
session_set_cookie_params(array options)
|
||||
Set session cookie parameters */
|
||||
static PHP_FUNCTION(session_set_cookie_params)
|
||||
PHP_FUNCTION(session_set_cookie_params)
|
||||
{
|
||||
zval *lifetime_or_options = NULL;
|
||||
zend_string *lifetime = NULL, *path = NULL, *domain = NULL, *samesite = NULL;
|
||||
@@ -1825,7 +1825,7 @@ cleanup:
|
||||
|
||||
/* {{{ proto array session_get_cookie_params(void)
|
||||
Return the session cookie parameters */
|
||||
static PHP_FUNCTION(session_get_cookie_params)
|
||||
PHP_FUNCTION(session_get_cookie_params)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -1844,7 +1844,7 @@ static PHP_FUNCTION(session_get_cookie_params)
|
||||
|
||||
/* {{{ proto string session_name([string newname])
|
||||
Return the current session name. If newname is given, the session name is replaced with newname */
|
||||
static PHP_FUNCTION(session_name)
|
||||
PHP_FUNCTION(session_name)
|
||||
{
|
||||
zend_string *name = NULL;
|
||||
zend_string *ini_name;
|
||||
@@ -1875,7 +1875,7 @@ static PHP_FUNCTION(session_name)
|
||||
|
||||
/* {{{ proto string session_module_name([string newname])
|
||||
Return the current module name used for accessing session data. If newname is given, the module name is replaced with newname */
|
||||
static PHP_FUNCTION(session_module_name)
|
||||
PHP_FUNCTION(session_module_name)
|
||||
{
|
||||
zend_string *name = NULL;
|
||||
zend_string *ini_name;
|
||||
@@ -1922,7 +1922,7 @@ static PHP_FUNCTION(session_module_name)
|
||||
|
||||
/* {{{ proto bool session_set_save_handler(string open, string close, string read, string write, string destroy, string gc, string create_sid)
|
||||
Sets user-level functions */
|
||||
static PHP_FUNCTION(session_set_save_handler)
|
||||
PHP_FUNCTION(session_set_save_handler)
|
||||
{
|
||||
zval *args = NULL;
|
||||
int i, num_args, argc = ZEND_NUM_ARGS();
|
||||
@@ -2086,7 +2086,7 @@ static PHP_FUNCTION(session_set_save_handler)
|
||||
|
||||
/* {{{ proto string session_save_path([string newname])
|
||||
Return the current save path passed to module_name. If newname is given, the save path is replaced with newname */
|
||||
static PHP_FUNCTION(session_save_path)
|
||||
PHP_FUNCTION(session_save_path)
|
||||
{
|
||||
zend_string *name = NULL;
|
||||
zend_string *ini_name;
|
||||
@@ -2122,7 +2122,7 @@ static PHP_FUNCTION(session_save_path)
|
||||
|
||||
/* {{{ proto string session_id([string newid])
|
||||
Return the current session id. If newid is given, the session id is replaced with newid */
|
||||
static PHP_FUNCTION(session_id)
|
||||
PHP_FUNCTION(session_id)
|
||||
{
|
||||
zend_string *name = NULL;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
@@ -2165,7 +2165,7 @@ static PHP_FUNCTION(session_id)
|
||||
|
||||
/* {{{ proto bool session_regenerate_id([bool delete_old_session])
|
||||
Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session. */
|
||||
static PHP_FUNCTION(session_regenerate_id)
|
||||
PHP_FUNCTION(session_regenerate_id)
|
||||
{
|
||||
zend_bool del_ses = 0;
|
||||
zend_string *data;
|
||||
@@ -2266,7 +2266,7 @@ static PHP_FUNCTION(session_regenerate_id)
|
||||
/* {{{ proto string session_create_id([string prefix])
|
||||
Generate new session ID. Intended for user save handlers. */
|
||||
/* This is not used yet */
|
||||
static PHP_FUNCTION(session_create_id)
|
||||
PHP_FUNCTION(session_create_id)
|
||||
{
|
||||
zend_string *prefix = NULL, *new_id;
|
||||
smart_str id = {0};
|
||||
@@ -2320,7 +2320,7 @@ static PHP_FUNCTION(session_create_id)
|
||||
|
||||
/* {{{ proto string session_cache_limiter([string new_cache_limiter])
|
||||
Return the current cache limiter. If new_cache_limited is given, the current cache_limiter is replaced with new_cache_limiter */
|
||||
static PHP_FUNCTION(session_cache_limiter)
|
||||
PHP_FUNCTION(session_cache_limiter)
|
||||
{
|
||||
zend_string *limiter = NULL;
|
||||
zend_string *ini_name;
|
||||
@@ -2351,7 +2351,7 @@ static PHP_FUNCTION(session_cache_limiter)
|
||||
|
||||
/* {{{ proto int session_cache_expire([int new_cache_expire])
|
||||
Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire */
|
||||
static PHP_FUNCTION(session_cache_expire)
|
||||
PHP_FUNCTION(session_cache_expire)
|
||||
{
|
||||
zend_long expires;
|
||||
zend_bool expires_is_null = 1;
|
||||
@@ -2384,7 +2384,7 @@ static PHP_FUNCTION(session_cache_expire)
|
||||
|
||||
/* {{{ proto string session_encode(void)
|
||||
Serializes the current setup and returns the serialized representation */
|
||||
static PHP_FUNCTION(session_encode)
|
||||
PHP_FUNCTION(session_encode)
|
||||
{
|
||||
zend_string *enc;
|
||||
|
||||
@@ -2403,7 +2403,7 @@ static PHP_FUNCTION(session_encode)
|
||||
|
||||
/* {{{ proto bool session_decode(string data)
|
||||
Deserializes data and reinitializes the variables */
|
||||
static PHP_FUNCTION(session_decode)
|
||||
PHP_FUNCTION(session_decode)
|
||||
{
|
||||
zend_string *str = NULL;
|
||||
|
||||
@@ -2437,7 +2437,7 @@ static int php_session_start_set_ini(zend_string *varname, zend_string *new_valu
|
||||
|
||||
/* {{{ proto bool session_start([array options])
|
||||
+ Begin session */
|
||||
static PHP_FUNCTION(session_start)
|
||||
PHP_FUNCTION(session_start)
|
||||
{
|
||||
zval *options = NULL;
|
||||
zval *value;
|
||||
@@ -2515,7 +2515,7 @@ static PHP_FUNCTION(session_start)
|
||||
|
||||
/* {{{ proto bool session_destroy(void)
|
||||
Destroy the current session and all data associated with it */
|
||||
static PHP_FUNCTION(session_destroy)
|
||||
PHP_FUNCTION(session_destroy)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -2527,7 +2527,7 @@ static PHP_FUNCTION(session_destroy)
|
||||
|
||||
/* {{{ proto bool session_unset(void)
|
||||
Unset all registered variables */
|
||||
static PHP_FUNCTION(session_unset)
|
||||
PHP_FUNCTION(session_unset)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -2550,7 +2550,7 @@ static PHP_FUNCTION(session_unset)
|
||||
|
||||
/* {{{ proto int session_gc(void)
|
||||
Perform GC and return number of deleted sessions */
|
||||
static PHP_FUNCTION(session_gc)
|
||||
PHP_FUNCTION(session_gc)
|
||||
{
|
||||
zend_long num;
|
||||
|
||||
@@ -2575,7 +2575,7 @@ static PHP_FUNCTION(session_gc)
|
||||
|
||||
/* {{{ proto bool session_write_close(void)
|
||||
Write session data and end session */
|
||||
static PHP_FUNCTION(session_write_close)
|
||||
PHP_FUNCTION(session_write_close)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -2591,7 +2591,7 @@ static PHP_FUNCTION(session_write_close)
|
||||
|
||||
/* {{{ proto bool session_abort(void)
|
||||
Abort session and end session. Session data will not be written */
|
||||
static PHP_FUNCTION(session_abort)
|
||||
PHP_FUNCTION(session_abort)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -2607,7 +2607,7 @@ static PHP_FUNCTION(session_abort)
|
||||
|
||||
/* {{{ proto bool session_reset(void)
|
||||
Reset session data from saved session data */
|
||||
static PHP_FUNCTION(session_reset)
|
||||
PHP_FUNCTION(session_reset)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -2623,7 +2623,7 @@ static PHP_FUNCTION(session_reset)
|
||||
|
||||
/* {{{ proto int session_status(void)
|
||||
Returns the current session status */
|
||||
static PHP_FUNCTION(session_status)
|
||||
PHP_FUNCTION(session_status)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -2635,7 +2635,7 @@ static PHP_FUNCTION(session_status)
|
||||
|
||||
/* {{{ proto void session_register_shutdown(void)
|
||||
Registers session_write_close() as a shutdown function */
|
||||
static PHP_FUNCTION(session_register_shutdown)
|
||||
PHP_FUNCTION(session_register_shutdown)
|
||||
{
|
||||
php_shutdown_function_entry shutdown_function_entry;
|
||||
|
||||
|
||||
@@ -28,13 +28,6 @@ extern zend_module_entry shmop_module_entry;
|
||||
PHP_MINIT_FUNCTION(shmop);
|
||||
PHP_MINFO_FUNCTION(shmop);
|
||||
|
||||
PHP_FUNCTION(shmop_open);
|
||||
PHP_FUNCTION(shmop_read);
|
||||
PHP_FUNCTION(shmop_close);
|
||||
PHP_FUNCTION(shmop_size);
|
||||
PHP_FUNCTION(shmop_write);
|
||||
PHP_FUNCTION(shmop_delete);
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
# include "win32/ipc.h"
|
||||
#endif
|
||||
|
||||
@@ -46,25 +46,12 @@ php_shmop_globals shmop_globals;
|
||||
|
||||
int shm_type;
|
||||
|
||||
/* {{{ shmop_functions[]
|
||||
*/
|
||||
static const zend_function_entry shmop_functions[] = {
|
||||
PHP_FE(shmop_open, arginfo_shmop_open)
|
||||
PHP_FE(shmop_read, arginfo_shmop_read)
|
||||
PHP_FE(shmop_close, arginfo_shmop_close)
|
||||
PHP_FE(shmop_size, arginfo_shmop_size)
|
||||
PHP_FE(shmop_write, arginfo_shmop_write)
|
||||
PHP_FE(shmop_delete, arginfo_shmop_delete)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ shmop_module_entry
|
||||
*/
|
||||
zend_module_entry shmop_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"shmop",
|
||||
shmop_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(shmop),
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
/** @return resource|false */
|
||||
function shmop_open(int $key, string $flags, int $mode, int $size) {}
|
||||
|
||||
|
||||
@@ -30,3 +30,22 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_delete, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_INFO(0, shmid)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(shmop_open);
|
||||
ZEND_FUNCTION(shmop_read);
|
||||
ZEND_FUNCTION(shmop_close);
|
||||
ZEND_FUNCTION(shmop_size);
|
||||
ZEND_FUNCTION(shmop_write);
|
||||
ZEND_FUNCTION(shmop_delete);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(shmop_open, arginfo_shmop_open)
|
||||
ZEND_FE(shmop_read, arginfo_shmop_read)
|
||||
ZEND_FE(shmop_close, arginfo_shmop_close)
|
||||
ZEND_FE(shmop_size, arginfo_shmop_size)
|
||||
ZEND_FE(shmop_write, arginfo_shmop_write)
|
||||
ZEND_FE(shmop_delete, arginfo_shmop_delete)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -67,21 +67,12 @@ PHP_MINFO_FUNCTION(%EXTNAME%)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ %EXTNAME%_functions[]
|
||||
*/
|
||||
static const zend_function_entry %EXTNAME%_functions[] = {
|
||||
PHP_FE(test1, arginfo_test1)
|
||||
PHP_FE(test2, arginfo_test2)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ %EXTNAME%_module_entry
|
||||
*/
|
||||
zend_module_entry %EXTNAME%_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"%EXTNAME%", /* Extension name */
|
||||
%EXTNAME%_functions, /* zend_function_entry */
|
||||
ext_functions, /* zend_function_entry */
|
||||
NULL, /* PHP_MINIT - Module initialization */
|
||||
NULL, /* PHP_MSHUTDOWN - Module shutdown */
|
||||
PHP_RINIT(%EXTNAME%), /* PHP_RINIT - Request initialization */
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function test1(): void {}
|
||||
|
||||
function test2(string $str = ""): string {}
|
||||
|
||||
@@ -6,3 +6,14 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test2, 0, 0, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(test1);
|
||||
ZEND_FUNCTION(test2);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(test1, arginfo_test1)
|
||||
ZEND_FE(test2, arginfo_test2)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -105,107 +105,10 @@ static PHP_MSHUTDOWN_FUNCTION(sockets);
|
||||
static PHP_MINFO_FUNCTION(sockets);
|
||||
static PHP_RSHUTDOWN_FUNCTION(sockets);
|
||||
|
||||
PHP_FUNCTION(socket_select);
|
||||
PHP_FUNCTION(socket_create_listen);
|
||||
#ifdef HAVE_SOCKETPAIR
|
||||
PHP_FUNCTION(socket_create_pair);
|
||||
#endif
|
||||
PHP_FUNCTION(socket_accept);
|
||||
PHP_FUNCTION(socket_set_nonblock);
|
||||
PHP_FUNCTION(socket_set_block);
|
||||
PHP_FUNCTION(socket_listen);
|
||||
PHP_FUNCTION(socket_close);
|
||||
PHP_FUNCTION(socket_write);
|
||||
PHP_FUNCTION(socket_read);
|
||||
PHP_FUNCTION(socket_getsockname);
|
||||
PHP_FUNCTION(socket_getpeername);
|
||||
PHP_FUNCTION(socket_create);
|
||||
PHP_FUNCTION(socket_connect);
|
||||
PHP_FUNCTION(socket_strerror);
|
||||
PHP_FUNCTION(socket_bind);
|
||||
PHP_FUNCTION(socket_recv);
|
||||
PHP_FUNCTION(socket_send);
|
||||
PHP_FUNCTION(socket_recvfrom);
|
||||
PHP_FUNCTION(socket_sendto);
|
||||
PHP_FUNCTION(socket_get_option);
|
||||
PHP_FUNCTION(socket_set_option);
|
||||
#ifdef HAVE_SHUTDOWN
|
||||
PHP_FUNCTION(socket_shutdown);
|
||||
#endif
|
||||
PHP_FUNCTION(socket_last_error);
|
||||
PHP_FUNCTION(socket_clear_error);
|
||||
PHP_FUNCTION(socket_import_stream);
|
||||
PHP_FUNCTION(socket_export_stream);
|
||||
PHP_FUNCTION(socket_addrinfo_lookup);
|
||||
PHP_FUNCTION(socket_addrinfo_connect);
|
||||
PHP_FUNCTION(socket_addrinfo_bind);
|
||||
PHP_FUNCTION(socket_addrinfo_explain);
|
||||
#ifdef PHP_WIN32
|
||||
PHP_FUNCTION(socket_wsaprotocol_info_export);
|
||||
PHP_FUNCTION(socket_wsaprotocol_info_import);
|
||||
PHP_FUNCTION(socket_wsaprotocol_info_release);
|
||||
#endif
|
||||
|
||||
/* {{{ sockets_functions[]
|
||||
*/
|
||||
static const zend_function_entry sockets_functions[] = {
|
||||
PHP_FE(socket_select, arginfo_socket_select)
|
||||
PHP_FE(socket_create, arginfo_socket_create)
|
||||
PHP_FE(socket_create_listen, arginfo_socket_create_listen)
|
||||
#ifdef HAVE_SOCKETPAIR
|
||||
PHP_FE(socket_create_pair, arginfo_socket_create_pair)
|
||||
#endif
|
||||
PHP_FE(socket_accept, arginfo_socket_accept)
|
||||
PHP_FE(socket_set_nonblock, arginfo_socket_set_nonblock)
|
||||
PHP_FE(socket_set_block, arginfo_socket_set_block)
|
||||
PHP_FE(socket_listen, arginfo_socket_listen)
|
||||
PHP_FE(socket_close, arginfo_socket_close)
|
||||
PHP_FE(socket_write, arginfo_socket_write)
|
||||
PHP_FE(socket_read, arginfo_socket_read)
|
||||
PHP_FE(socket_getsockname, arginfo_socket_getsockname)
|
||||
PHP_FE(socket_getpeername, arginfo_socket_getpeername)
|
||||
PHP_FE(socket_connect, arginfo_socket_connect)
|
||||
PHP_FE(socket_strerror, arginfo_socket_strerror)
|
||||
PHP_FE(socket_bind, arginfo_socket_bind)
|
||||
PHP_FE(socket_recv, arginfo_socket_recv)
|
||||
PHP_FE(socket_send, arginfo_socket_send)
|
||||
PHP_FE(socket_recvfrom, arginfo_socket_recvfrom)
|
||||
PHP_FE(socket_sendto, arginfo_socket_sendto)
|
||||
PHP_FE(socket_get_option, arginfo_socket_get_option)
|
||||
PHP_FE(socket_set_option, arginfo_socket_set_option)
|
||||
#ifdef HAVE_SHUTDOWN
|
||||
PHP_FE(socket_shutdown, arginfo_socket_shutdown)
|
||||
#endif
|
||||
PHP_FE(socket_last_error, arginfo_socket_last_error)
|
||||
PHP_FE(socket_clear_error, arginfo_socket_clear_error)
|
||||
PHP_FE(socket_import_stream, arginfo_socket_import_stream)
|
||||
PHP_FE(socket_export_stream, arginfo_socket_export_stream)
|
||||
PHP_FE(socket_sendmsg, arginfo_socket_sendmsg)
|
||||
PHP_FE(socket_recvmsg, arginfo_socket_recvmsg)
|
||||
PHP_FE(socket_cmsg_space, arginfo_socket_cmsg_space)
|
||||
PHP_FE(socket_addrinfo_lookup, arginfo_socket_addrinfo_lookup)
|
||||
PHP_FE(socket_addrinfo_connect, arginfo_socket_addrinfo_connect)
|
||||
PHP_FE(socket_addrinfo_bind, arginfo_socket_addrinfo_bind)
|
||||
PHP_FE(socket_addrinfo_explain, arginfo_socket_addrinfo_explain)
|
||||
|
||||
/* for downwards compatibility */
|
||||
PHP_FALIAS(socket_getopt, socket_get_option, arginfo_socket_getopt)
|
||||
PHP_FALIAS(socket_setopt, socket_set_option, arginfo_socket_setopt)
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
PHP_FE(socket_wsaprotocol_info_export, arginfo_socket_wsaprotocol_info_export)
|
||||
PHP_FE(socket_wsaprotocol_info_import, arginfo_socket_wsaprotocol_info_import)
|
||||
PHP_FE(socket_wsaprotocol_info_release, arginfo_socket_wsaprotocol_info_release)
|
||||
#endif
|
||||
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry sockets_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"sockets",
|
||||
sockets_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(sockets),
|
||||
PHP_MSHUTDOWN(sockets),
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function socket_select(?array &$read_fds, ?array &$write_fds, ?array &$except_fds, ?int $tv_sec, int $tv_usec = 0): int|false {}
|
||||
|
||||
/** @return resource|false */
|
||||
|
||||
@@ -201,3 +201,106 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_wsaprotocol_info_release,
|
||||
ZEND_ARG_TYPE_INFO(0, info_id, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_FUNCTION(socket_select);
|
||||
ZEND_FUNCTION(socket_create_listen);
|
||||
ZEND_FUNCTION(socket_accept);
|
||||
ZEND_FUNCTION(socket_set_nonblock);
|
||||
ZEND_FUNCTION(socket_set_block);
|
||||
ZEND_FUNCTION(socket_listen);
|
||||
ZEND_FUNCTION(socket_close);
|
||||
ZEND_FUNCTION(socket_write);
|
||||
ZEND_FUNCTION(socket_read);
|
||||
ZEND_FUNCTION(socket_getsockname);
|
||||
ZEND_FUNCTION(socket_getpeername);
|
||||
ZEND_FUNCTION(socket_create);
|
||||
ZEND_FUNCTION(socket_connect);
|
||||
ZEND_FUNCTION(socket_strerror);
|
||||
ZEND_FUNCTION(socket_bind);
|
||||
ZEND_FUNCTION(socket_recv);
|
||||
ZEND_FUNCTION(socket_send);
|
||||
ZEND_FUNCTION(socket_recvfrom);
|
||||
ZEND_FUNCTION(socket_sendto);
|
||||
ZEND_FUNCTION(socket_get_option);
|
||||
ZEND_FUNCTION(socket_set_option);
|
||||
#if defined(HAVE_SOCKETPAIR)
|
||||
ZEND_FUNCTION(socket_create_pair);
|
||||
#endif
|
||||
#if defined(HAVE_SHUTDOWN)
|
||||
ZEND_FUNCTION(socket_shutdown);
|
||||
#endif
|
||||
ZEND_FUNCTION(socket_last_error);
|
||||
ZEND_FUNCTION(socket_clear_error);
|
||||
ZEND_FUNCTION(socket_import_stream);
|
||||
ZEND_FUNCTION(socket_export_stream);
|
||||
ZEND_FUNCTION(socket_sendmsg);
|
||||
ZEND_FUNCTION(socket_recvmsg);
|
||||
ZEND_FUNCTION(socket_cmsg_space);
|
||||
ZEND_FUNCTION(socket_addrinfo_lookup);
|
||||
ZEND_FUNCTION(socket_addrinfo_connect);
|
||||
ZEND_FUNCTION(socket_addrinfo_bind);
|
||||
ZEND_FUNCTION(socket_addrinfo_explain);
|
||||
#if defined(PHP_WIN32)
|
||||
ZEND_FUNCTION(socket_wsaprotocol_info_export);
|
||||
#endif
|
||||
#if defined(PHP_WIN32)
|
||||
ZEND_FUNCTION(socket_wsaprotocol_info_import);
|
||||
#endif
|
||||
#if defined(PHP_WIN32)
|
||||
ZEND_FUNCTION(socket_wsaprotocol_info_release);
|
||||
#endif
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(socket_select, arginfo_socket_select)
|
||||
ZEND_FE(socket_create_listen, arginfo_socket_create_listen)
|
||||
ZEND_FE(socket_accept, arginfo_socket_accept)
|
||||
ZEND_FE(socket_set_nonblock, arginfo_socket_set_nonblock)
|
||||
ZEND_FE(socket_set_block, arginfo_socket_set_block)
|
||||
ZEND_FE(socket_listen, arginfo_socket_listen)
|
||||
ZEND_FE(socket_close, arginfo_socket_close)
|
||||
ZEND_FE(socket_write, arginfo_socket_write)
|
||||
ZEND_FE(socket_read, arginfo_socket_read)
|
||||
ZEND_FE(socket_getsockname, arginfo_socket_getsockname)
|
||||
ZEND_FE(socket_getpeername, arginfo_socket_getpeername)
|
||||
ZEND_FE(socket_create, arginfo_socket_create)
|
||||
ZEND_FE(socket_connect, arginfo_socket_connect)
|
||||
ZEND_FE(socket_strerror, arginfo_socket_strerror)
|
||||
ZEND_FE(socket_bind, arginfo_socket_bind)
|
||||
ZEND_FE(socket_recv, arginfo_socket_recv)
|
||||
ZEND_FE(socket_send, arginfo_socket_send)
|
||||
ZEND_FE(socket_recvfrom, arginfo_socket_recvfrom)
|
||||
ZEND_FE(socket_sendto, arginfo_socket_sendto)
|
||||
ZEND_FE(socket_get_option, arginfo_socket_get_option)
|
||||
ZEND_FALIAS(socket_getopt, socket_get_option, arginfo_socket_getopt)
|
||||
ZEND_FE(socket_set_option, arginfo_socket_set_option)
|
||||
ZEND_FALIAS(socket_setopt, socket_set_option, arginfo_socket_setopt)
|
||||
#if defined(HAVE_SOCKETPAIR)
|
||||
ZEND_FE(socket_create_pair, arginfo_socket_create_pair)
|
||||
#endif
|
||||
#if defined(HAVE_SHUTDOWN)
|
||||
ZEND_FE(socket_shutdown, arginfo_socket_shutdown)
|
||||
#endif
|
||||
ZEND_FE(socket_last_error, arginfo_socket_last_error)
|
||||
ZEND_FE(socket_clear_error, arginfo_socket_clear_error)
|
||||
ZEND_FE(socket_import_stream, arginfo_socket_import_stream)
|
||||
ZEND_FE(socket_export_stream, arginfo_socket_export_stream)
|
||||
ZEND_FE(socket_sendmsg, arginfo_socket_sendmsg)
|
||||
ZEND_FE(socket_recvmsg, arginfo_socket_recvmsg)
|
||||
ZEND_FE(socket_cmsg_space, arginfo_socket_cmsg_space)
|
||||
ZEND_FE(socket_addrinfo_lookup, arginfo_socket_addrinfo_lookup)
|
||||
ZEND_FE(socket_addrinfo_connect, arginfo_socket_addrinfo_connect)
|
||||
ZEND_FE(socket_addrinfo_bind, arginfo_socket_addrinfo_bind)
|
||||
ZEND_FE(socket_addrinfo_explain, arginfo_socket_addrinfo_explain)
|
||||
#if defined(PHP_WIN32)
|
||||
ZEND_FE(socket_wsaprotocol_info_export, arginfo_socket_wsaprotocol_info_export)
|
||||
#endif
|
||||
#if defined(PHP_WIN32)
|
||||
ZEND_FE(socket_wsaprotocol_info_import, arginfo_socket_wsaprotocol_info_import)
|
||||
#endif
|
||||
#if defined(PHP_WIN32)
|
||||
ZEND_FE(socket_wsaprotocol_info_release, arginfo_socket_wsaprotocol_info_release)
|
||||
#endif
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -66,119 +66,6 @@ static zend_class_entry *sodium_exception_ce;
|
||||
# define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE
|
||||
#endif
|
||||
|
||||
static const zend_function_entry sodium_functions[] = {
|
||||
PHP_FE(sodium_crypto_aead_aes256gcm_is_available, arginfo_sodium_crypto_aead_aes256gcm_is_available)
|
||||
#ifdef HAVE_AESGCM
|
||||
PHP_FE(sodium_crypto_aead_aes256gcm_decrypt, arginfo_sodium_crypto_aead_aes256gcm_decrypt)
|
||||
PHP_FE(sodium_crypto_aead_aes256gcm_encrypt, arginfo_sodium_crypto_aead_aes256gcm_encrypt)
|
||||
PHP_FE(sodium_crypto_aead_aes256gcm_keygen, arginfo_sodium_crypto_aead_aes256gcm_keygen)
|
||||
#endif
|
||||
PHP_FE(sodium_crypto_aead_chacha20poly1305_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_decrypt)
|
||||
PHP_FE(sodium_crypto_aead_chacha20poly1305_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_encrypt)
|
||||
PHP_FE(sodium_crypto_aead_chacha20poly1305_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_keygen)
|
||||
PHP_FE(sodium_crypto_aead_chacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_decrypt)
|
||||
PHP_FE(sodium_crypto_aead_chacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_encrypt)
|
||||
PHP_FE(sodium_crypto_aead_chacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_keygen)
|
||||
#ifdef crypto_aead_xchacha20poly1305_IETF_NPUBBYTES
|
||||
PHP_FE(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt)
|
||||
PHP_FE(sodium_crypto_aead_xchacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_keygen)
|
||||
PHP_FE(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt)
|
||||
#endif
|
||||
PHP_FE(sodium_crypto_auth, arginfo_sodium_crypto_auth)
|
||||
PHP_FE(sodium_crypto_auth_keygen, arginfo_sodium_crypto_auth_keygen)
|
||||
PHP_FE(sodium_crypto_auth_verify, arginfo_sodium_crypto_auth_verify)
|
||||
PHP_FE(sodium_crypto_box, arginfo_sodium_crypto_box)
|
||||
PHP_FE(sodium_crypto_box_keypair, arginfo_sodium_crypto_box_keypair)
|
||||
PHP_FE(sodium_crypto_box_seed_keypair, arginfo_sodium_crypto_box_seed_keypair)
|
||||
PHP_FE(sodium_crypto_box_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey)
|
||||
PHP_FE(sodium_crypto_box_open, arginfo_sodium_crypto_box_open)
|
||||
PHP_FE(sodium_crypto_box_publickey, arginfo_sodium_crypto_box_publickey)
|
||||
PHP_FE(sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_box_publickey_from_secretkey)
|
||||
PHP_FE(sodium_crypto_box_seal, arginfo_sodium_crypto_box_seal)
|
||||
PHP_FE(sodium_crypto_box_seal_open, arginfo_sodium_crypto_box_seal_open)
|
||||
PHP_FE(sodium_crypto_box_secretkey, arginfo_sodium_crypto_box_secretkey)
|
||||
PHP_FE(sodium_crypto_kx_keypair, arginfo_sodium_crypto_kx_keypair)
|
||||
PHP_FE(sodium_crypto_kx_publickey, arginfo_sodium_crypto_kx_publickey)
|
||||
PHP_FE(sodium_crypto_kx_secretkey, arginfo_sodium_crypto_kx_secretkey)
|
||||
PHP_FE(sodium_crypto_kx_seed_keypair, arginfo_sodium_crypto_kx_seed_keypair)
|
||||
PHP_FE(sodium_crypto_kx_client_session_keys, arginfo_sodium_crypto_kx_client_session_keys)
|
||||
PHP_FE(sodium_crypto_kx_server_session_keys, arginfo_sodium_crypto_kx_server_session_keys)
|
||||
PHP_FE(sodium_crypto_generichash, arginfo_sodium_crypto_generichash)
|
||||
PHP_FE(sodium_crypto_generichash_keygen, arginfo_sodium_crypto_generichash_keygen)
|
||||
PHP_FE(sodium_crypto_generichash_init, arginfo_sodium_crypto_generichash_init)
|
||||
PHP_FE(sodium_crypto_generichash_update, arginfo_sodium_crypto_generichash_update)
|
||||
PHP_FE(sodium_crypto_generichash_final, arginfo_sodium_crypto_generichash_final)
|
||||
PHP_FE(sodium_crypto_kdf_derive_from_key, arginfo_sodium_crypto_kdf_derive_from_key)
|
||||
PHP_FE(sodium_crypto_kdf_keygen, arginfo_sodium_crypto_kdf_keygen)
|
||||
#ifdef crypto_pwhash_SALTBYTES
|
||||
PHP_FE(sodium_crypto_pwhash, arginfo_sodium_crypto_pwhash)
|
||||
PHP_FE(sodium_crypto_pwhash_str, arginfo_sodium_crypto_pwhash_str)
|
||||
PHP_FE(sodium_crypto_pwhash_str_verify, arginfo_sodium_crypto_pwhash_str_verify)
|
||||
#endif
|
||||
#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
|
||||
PHP_FE(sodium_crypto_pwhash_str_needs_rehash, arginfo_sodium_crypto_pwhash_str_needs_rehash)
|
||||
#endif
|
||||
#ifdef crypto_pwhash_scryptsalsa208sha256_SALTBYTES
|
||||
PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256)
|
||||
PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str)
|
||||
PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify)
|
||||
#endif
|
||||
PHP_FE(sodium_crypto_scalarmult, arginfo_sodium_crypto_scalarmult)
|
||||
PHP_FE(sodium_crypto_secretbox, arginfo_sodium_crypto_secretbox)
|
||||
PHP_FE(sodium_crypto_secretbox_keygen, arginfo_sodium_crypto_secretbox_keygen)
|
||||
PHP_FE(sodium_crypto_secretbox_open, arginfo_sodium_crypto_secretbox_open)
|
||||
#ifdef crypto_secretstream_xchacha20poly1305_ABYTES
|
||||
PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_keygen, arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen)
|
||||
PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_init_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push)
|
||||
PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_push)
|
||||
PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_init_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull)
|
||||
PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull)
|
||||
PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_rekey, arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey)
|
||||
#endif
|
||||
PHP_FE(sodium_crypto_shorthash, arginfo_sodium_crypto_shorthash)
|
||||
PHP_FE(sodium_crypto_shorthash_keygen, arginfo_sodium_crypto_shorthash_keygen)
|
||||
PHP_FE(sodium_crypto_sign, arginfo_sodium_crypto_sign)
|
||||
PHP_FE(sodium_crypto_sign_detached, arginfo_sodium_crypto_sign_detached)
|
||||
PHP_FE(sodium_crypto_sign_ed25519_pk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519)
|
||||
PHP_FE(sodium_crypto_sign_ed25519_sk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519)
|
||||
PHP_FE(sodium_crypto_sign_keypair, arginfo_sodium_crypto_sign_keypair)
|
||||
PHP_FE(sodium_crypto_sign_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey)
|
||||
PHP_FE(sodium_crypto_sign_open, arginfo_sodium_crypto_sign_open)
|
||||
PHP_FE(sodium_crypto_sign_publickey, arginfo_sodium_crypto_sign_publickey)
|
||||
PHP_FE(sodium_crypto_sign_secretkey, arginfo_sodium_crypto_sign_secretkey)
|
||||
PHP_FE(sodium_crypto_sign_publickey_from_secretkey, arginfo_sodium_crypto_sign_publickey_from_secretkey)
|
||||
PHP_FE(sodium_crypto_sign_seed_keypair, arginfo_sodium_crypto_sign_seed_keypair)
|
||||
PHP_FE(sodium_crypto_sign_verify_detached, arginfo_sodium_crypto_sign_verify_detached)
|
||||
PHP_FE(sodium_crypto_stream, arginfo_sodium_crypto_stream)
|
||||
PHP_FE(sodium_crypto_stream_keygen, arginfo_sodium_crypto_stream_keygen)
|
||||
PHP_FE(sodium_crypto_stream_xor, arginfo_sodium_crypto_stream_xor)
|
||||
|
||||
/* helpers */
|
||||
|
||||
PHP_FE(sodium_add, arginfo_sodium_add)
|
||||
PHP_FE(sodium_compare, arginfo_sodium_compare)
|
||||
PHP_FE(sodium_increment, arginfo_sodium_increment)
|
||||
PHP_FE(sodium_memcmp, arginfo_sodium_memcmp)
|
||||
PHP_FE(sodium_memzero, arginfo_sodium_memzero)
|
||||
PHP_FE(sodium_pad, arginfo_sodium_pad)
|
||||
PHP_FE(sodium_unpad, arginfo_sodium_unpad)
|
||||
|
||||
/* codecs */
|
||||
|
||||
PHP_FE(sodium_bin2hex, arginfo_sodium_bin2hex)
|
||||
PHP_FE(sodium_hex2bin, arginfo_sodium_hex2bin)
|
||||
#ifdef sodium_base64_VARIANT_ORIGINAL
|
||||
PHP_FE(sodium_bin2base64, arginfo_sodium_bin2base64)
|
||||
PHP_FE(sodium_base642bin, arginfo_sodium_base642bin)
|
||||
#endif
|
||||
|
||||
/* aliases */
|
||||
|
||||
PHP_FALIAS(sodium_crypto_scalarmult_base, sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_scalarmult_base)
|
||||
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
/* Load after the "standard" module in order to give it
|
||||
* priority in registering argon2i/argon2id password hashers.
|
||||
*/
|
||||
@@ -192,7 +79,7 @@ zend_module_entry sodium_module_entry = {
|
||||
NULL,
|
||||
sodium_deps,
|
||||
"sodium",
|
||||
sodium_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(sodium),
|
||||
PHP_MSHUTDOWN(sodium),
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function sodium_crypto_aead_aes256gcm_is_available(): bool {}
|
||||
|
||||
#ifdef HAVE_AESGCM
|
||||
|
||||
@@ -381,3 +381,263 @@ ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
#define arginfo_sodium_crypto_scalarmult_base arginfo_sodium_crypto_box_seed_keypair
|
||||
|
||||
|
||||
ZEND_FUNCTION(sodium_crypto_aead_aes256gcm_is_available);
|
||||
#if defined(HAVE_AESGCM)
|
||||
ZEND_FUNCTION(sodium_crypto_aead_aes256gcm_decrypt);
|
||||
#endif
|
||||
#if defined(HAVE_AESGCM)
|
||||
ZEND_FUNCTION(sodium_crypto_aead_aes256gcm_encrypt);
|
||||
#endif
|
||||
#if defined(HAVE_AESGCM)
|
||||
ZEND_FUNCTION(sodium_crypto_aead_aes256gcm_keygen);
|
||||
#endif
|
||||
ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_decrypt);
|
||||
ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_encrypt);
|
||||
ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_keygen);
|
||||
ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_decrypt);
|
||||
ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_encrypt);
|
||||
ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_keygen);
|
||||
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt);
|
||||
#endif
|
||||
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_keygen);
|
||||
#endif
|
||||
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt);
|
||||
#endif
|
||||
ZEND_FUNCTION(sodium_crypto_auth);
|
||||
ZEND_FUNCTION(sodium_crypto_auth_keygen);
|
||||
ZEND_FUNCTION(sodium_crypto_auth_verify);
|
||||
ZEND_FUNCTION(sodium_crypto_box);
|
||||
ZEND_FUNCTION(sodium_crypto_box_keypair);
|
||||
ZEND_FUNCTION(sodium_crypto_box_seed_keypair);
|
||||
ZEND_FUNCTION(sodium_crypto_box_keypair_from_secretkey_and_publickey);
|
||||
ZEND_FUNCTION(sodium_crypto_box_open);
|
||||
ZEND_FUNCTION(sodium_crypto_box_publickey);
|
||||
ZEND_FUNCTION(sodium_crypto_box_publickey_from_secretkey);
|
||||
ZEND_FUNCTION(sodium_crypto_box_seal);
|
||||
ZEND_FUNCTION(sodium_crypto_box_seal_open);
|
||||
ZEND_FUNCTION(sodium_crypto_box_secretkey);
|
||||
ZEND_FUNCTION(sodium_crypto_kx_keypair);
|
||||
ZEND_FUNCTION(sodium_crypto_kx_publickey);
|
||||
ZEND_FUNCTION(sodium_crypto_kx_secretkey);
|
||||
ZEND_FUNCTION(sodium_crypto_kx_seed_keypair);
|
||||
ZEND_FUNCTION(sodium_crypto_kx_client_session_keys);
|
||||
ZEND_FUNCTION(sodium_crypto_kx_server_session_keys);
|
||||
ZEND_FUNCTION(sodium_crypto_generichash);
|
||||
ZEND_FUNCTION(sodium_crypto_generichash_keygen);
|
||||
ZEND_FUNCTION(sodium_crypto_generichash_init);
|
||||
ZEND_FUNCTION(sodium_crypto_generichash_update);
|
||||
ZEND_FUNCTION(sodium_crypto_generichash_final);
|
||||
ZEND_FUNCTION(sodium_crypto_kdf_derive_from_key);
|
||||
ZEND_FUNCTION(sodium_crypto_kdf_keygen);
|
||||
#if defined(crypto_pwhash_SALTBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_pwhash);
|
||||
#endif
|
||||
#if defined(crypto_pwhash_SALTBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_pwhash_str);
|
||||
#endif
|
||||
#if defined(crypto_pwhash_SALTBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_pwhash_str_verify);
|
||||
#endif
|
||||
#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
|
||||
ZEND_FUNCTION(sodium_crypto_pwhash_str_needs_rehash);
|
||||
#endif
|
||||
#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256);
|
||||
#endif
|
||||
#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str);
|
||||
#endif
|
||||
#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify);
|
||||
#endif
|
||||
ZEND_FUNCTION(sodium_crypto_scalarmult);
|
||||
ZEND_FUNCTION(sodium_crypto_secretbox);
|
||||
ZEND_FUNCTION(sodium_crypto_secretbox_keygen);
|
||||
ZEND_FUNCTION(sodium_crypto_secretbox_open);
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_keygen);
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_push);
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_push);
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_pull);
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_pull);
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_rekey);
|
||||
#endif
|
||||
ZEND_FUNCTION(sodium_crypto_shorthash);
|
||||
ZEND_FUNCTION(sodium_crypto_shorthash_keygen);
|
||||
ZEND_FUNCTION(sodium_crypto_sign);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_detached);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_ed25519_pk_to_curve25519);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_ed25519_sk_to_curve25519);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_keypair);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_keypair_from_secretkey_and_publickey);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_open);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_publickey);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_secretkey);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_publickey_from_secretkey);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_seed_keypair);
|
||||
ZEND_FUNCTION(sodium_crypto_sign_verify_detached);
|
||||
ZEND_FUNCTION(sodium_crypto_stream);
|
||||
ZEND_FUNCTION(sodium_crypto_stream_keygen);
|
||||
ZEND_FUNCTION(sodium_crypto_stream_xor);
|
||||
ZEND_FUNCTION(sodium_add);
|
||||
ZEND_FUNCTION(sodium_compare);
|
||||
ZEND_FUNCTION(sodium_increment);
|
||||
ZEND_FUNCTION(sodium_memcmp);
|
||||
ZEND_FUNCTION(sodium_memzero);
|
||||
ZEND_FUNCTION(sodium_pad);
|
||||
ZEND_FUNCTION(sodium_unpad);
|
||||
ZEND_FUNCTION(sodium_bin2hex);
|
||||
ZEND_FUNCTION(sodium_hex2bin);
|
||||
#if defined(sodium_base64_VARIANT_ORIGINAL)
|
||||
ZEND_FUNCTION(sodium_bin2base64);
|
||||
#endif
|
||||
#if defined(sodium_base64_VARIANT_ORIGINAL)
|
||||
ZEND_FUNCTION(sodium_base642bin);
|
||||
#endif
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(sodium_crypto_aead_aes256gcm_is_available, arginfo_sodium_crypto_aead_aes256gcm_is_available)
|
||||
#if defined(HAVE_AESGCM)
|
||||
ZEND_FE(sodium_crypto_aead_aes256gcm_decrypt, arginfo_sodium_crypto_aead_aes256gcm_decrypt)
|
||||
#endif
|
||||
#if defined(HAVE_AESGCM)
|
||||
ZEND_FE(sodium_crypto_aead_aes256gcm_encrypt, arginfo_sodium_crypto_aead_aes256gcm_encrypt)
|
||||
#endif
|
||||
#if defined(HAVE_AESGCM)
|
||||
ZEND_FE(sodium_crypto_aead_aes256gcm_keygen, arginfo_sodium_crypto_aead_aes256gcm_keygen)
|
||||
#endif
|
||||
ZEND_FE(sodium_crypto_aead_chacha20poly1305_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_decrypt)
|
||||
ZEND_FE(sodium_crypto_aead_chacha20poly1305_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_encrypt)
|
||||
ZEND_FE(sodium_crypto_aead_chacha20poly1305_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_keygen)
|
||||
ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_decrypt)
|
||||
ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_encrypt)
|
||||
ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_keygen)
|
||||
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
|
||||
ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt)
|
||||
#endif
|
||||
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
|
||||
ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_keygen)
|
||||
#endif
|
||||
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
|
||||
ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt)
|
||||
#endif
|
||||
ZEND_FE(sodium_crypto_auth, arginfo_sodium_crypto_auth)
|
||||
ZEND_FE(sodium_crypto_auth_keygen, arginfo_sodium_crypto_auth_keygen)
|
||||
ZEND_FE(sodium_crypto_auth_verify, arginfo_sodium_crypto_auth_verify)
|
||||
ZEND_FE(sodium_crypto_box, arginfo_sodium_crypto_box)
|
||||
ZEND_FE(sodium_crypto_box_keypair, arginfo_sodium_crypto_box_keypair)
|
||||
ZEND_FE(sodium_crypto_box_seed_keypair, arginfo_sodium_crypto_box_seed_keypair)
|
||||
ZEND_FE(sodium_crypto_box_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey)
|
||||
ZEND_FE(sodium_crypto_box_open, arginfo_sodium_crypto_box_open)
|
||||
ZEND_FE(sodium_crypto_box_publickey, arginfo_sodium_crypto_box_publickey)
|
||||
ZEND_FE(sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_box_publickey_from_secretkey)
|
||||
ZEND_FE(sodium_crypto_box_seal, arginfo_sodium_crypto_box_seal)
|
||||
ZEND_FE(sodium_crypto_box_seal_open, arginfo_sodium_crypto_box_seal_open)
|
||||
ZEND_FE(sodium_crypto_box_secretkey, arginfo_sodium_crypto_box_secretkey)
|
||||
ZEND_FE(sodium_crypto_kx_keypair, arginfo_sodium_crypto_kx_keypair)
|
||||
ZEND_FE(sodium_crypto_kx_publickey, arginfo_sodium_crypto_kx_publickey)
|
||||
ZEND_FE(sodium_crypto_kx_secretkey, arginfo_sodium_crypto_kx_secretkey)
|
||||
ZEND_FE(sodium_crypto_kx_seed_keypair, arginfo_sodium_crypto_kx_seed_keypair)
|
||||
ZEND_FE(sodium_crypto_kx_client_session_keys, arginfo_sodium_crypto_kx_client_session_keys)
|
||||
ZEND_FE(sodium_crypto_kx_server_session_keys, arginfo_sodium_crypto_kx_server_session_keys)
|
||||
ZEND_FE(sodium_crypto_generichash, arginfo_sodium_crypto_generichash)
|
||||
ZEND_FE(sodium_crypto_generichash_keygen, arginfo_sodium_crypto_generichash_keygen)
|
||||
ZEND_FE(sodium_crypto_generichash_init, arginfo_sodium_crypto_generichash_init)
|
||||
ZEND_FE(sodium_crypto_generichash_update, arginfo_sodium_crypto_generichash_update)
|
||||
ZEND_FE(sodium_crypto_generichash_final, arginfo_sodium_crypto_generichash_final)
|
||||
ZEND_FE(sodium_crypto_kdf_derive_from_key, arginfo_sodium_crypto_kdf_derive_from_key)
|
||||
ZEND_FE(sodium_crypto_kdf_keygen, arginfo_sodium_crypto_kdf_keygen)
|
||||
#if defined(crypto_pwhash_SALTBYTES)
|
||||
ZEND_FE(sodium_crypto_pwhash, arginfo_sodium_crypto_pwhash)
|
||||
#endif
|
||||
#if defined(crypto_pwhash_SALTBYTES)
|
||||
ZEND_FE(sodium_crypto_pwhash_str, arginfo_sodium_crypto_pwhash_str)
|
||||
#endif
|
||||
#if defined(crypto_pwhash_SALTBYTES)
|
||||
ZEND_FE(sodium_crypto_pwhash_str_verify, arginfo_sodium_crypto_pwhash_str_verify)
|
||||
#endif
|
||||
#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
|
||||
ZEND_FE(sodium_crypto_pwhash_str_needs_rehash, arginfo_sodium_crypto_pwhash_str_needs_rehash)
|
||||
#endif
|
||||
#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
|
||||
ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256)
|
||||
#endif
|
||||
#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
|
||||
ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str)
|
||||
#endif
|
||||
#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
|
||||
ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify)
|
||||
#endif
|
||||
ZEND_FE(sodium_crypto_scalarmult, arginfo_sodium_crypto_scalarmult)
|
||||
ZEND_FE(sodium_crypto_secretbox, arginfo_sodium_crypto_secretbox)
|
||||
ZEND_FE(sodium_crypto_secretbox_keygen, arginfo_sodium_crypto_secretbox_keygen)
|
||||
ZEND_FE(sodium_crypto_secretbox_open, arginfo_sodium_crypto_secretbox_open)
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_keygen, arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen)
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_init_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push)
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_push)
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_init_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull)
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull)
|
||||
#endif
|
||||
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_rekey, arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey)
|
||||
#endif
|
||||
ZEND_FE(sodium_crypto_shorthash, arginfo_sodium_crypto_shorthash)
|
||||
ZEND_FE(sodium_crypto_shorthash_keygen, arginfo_sodium_crypto_shorthash_keygen)
|
||||
ZEND_FE(sodium_crypto_sign, arginfo_sodium_crypto_sign)
|
||||
ZEND_FE(sodium_crypto_sign_detached, arginfo_sodium_crypto_sign_detached)
|
||||
ZEND_FE(sodium_crypto_sign_ed25519_pk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519)
|
||||
ZEND_FE(sodium_crypto_sign_ed25519_sk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519)
|
||||
ZEND_FE(sodium_crypto_sign_keypair, arginfo_sodium_crypto_sign_keypair)
|
||||
ZEND_FE(sodium_crypto_sign_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey)
|
||||
ZEND_FE(sodium_crypto_sign_open, arginfo_sodium_crypto_sign_open)
|
||||
ZEND_FE(sodium_crypto_sign_publickey, arginfo_sodium_crypto_sign_publickey)
|
||||
ZEND_FE(sodium_crypto_sign_secretkey, arginfo_sodium_crypto_sign_secretkey)
|
||||
ZEND_FE(sodium_crypto_sign_publickey_from_secretkey, arginfo_sodium_crypto_sign_publickey_from_secretkey)
|
||||
ZEND_FE(sodium_crypto_sign_seed_keypair, arginfo_sodium_crypto_sign_seed_keypair)
|
||||
ZEND_FE(sodium_crypto_sign_verify_detached, arginfo_sodium_crypto_sign_verify_detached)
|
||||
ZEND_FE(sodium_crypto_stream, arginfo_sodium_crypto_stream)
|
||||
ZEND_FE(sodium_crypto_stream_keygen, arginfo_sodium_crypto_stream_keygen)
|
||||
ZEND_FE(sodium_crypto_stream_xor, arginfo_sodium_crypto_stream_xor)
|
||||
ZEND_FE(sodium_add, arginfo_sodium_add)
|
||||
ZEND_FE(sodium_compare, arginfo_sodium_compare)
|
||||
ZEND_FE(sodium_increment, arginfo_sodium_increment)
|
||||
ZEND_FE(sodium_memcmp, arginfo_sodium_memcmp)
|
||||
ZEND_FE(sodium_memzero, arginfo_sodium_memzero)
|
||||
ZEND_FE(sodium_pad, arginfo_sodium_pad)
|
||||
ZEND_FE(sodium_unpad, arginfo_sodium_unpad)
|
||||
ZEND_FE(sodium_bin2hex, arginfo_sodium_bin2hex)
|
||||
ZEND_FE(sodium_hex2bin, arginfo_sodium_hex2bin)
|
||||
#if defined(sodium_base64_VARIANT_ORIGINAL)
|
||||
ZEND_FE(sodium_bin2base64, arginfo_sodium_bin2base64)
|
||||
#endif
|
||||
#if defined(sodium_base64_VARIANT_ORIGINAL)
|
||||
ZEND_FE(sodium_base642bin, arginfo_sodium_base642bin)
|
||||
#endif
|
||||
ZEND_FALIAS(sodium_crypto_scalarmult_base, sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_scalarmult_base)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -33,14 +33,6 @@
|
||||
PHP_MINIT_FUNCTION(sysvmsg);
|
||||
PHP_MINFO_FUNCTION(sysvmsg);
|
||||
|
||||
PHP_FUNCTION(msg_get_queue);
|
||||
PHP_FUNCTION(msg_remove_queue);
|
||||
PHP_FUNCTION(msg_stat_queue);
|
||||
PHP_FUNCTION(msg_set_queue);
|
||||
PHP_FUNCTION(msg_send);
|
||||
PHP_FUNCTION(msg_receive);
|
||||
PHP_FUNCTION(msg_queue_exists);
|
||||
|
||||
typedef struct {
|
||||
key_t key;
|
||||
zend_long id;
|
||||
@@ -61,28 +53,12 @@ struct php_msgbuf {
|
||||
/* True global resources - no need for thread safety here */
|
||||
static int le_sysvmsg;
|
||||
|
||||
/* {{{ sysvmsg_functions[]
|
||||
*
|
||||
* Every user visible function must have an entry in sysvmsg_functions[].
|
||||
*/
|
||||
static const zend_function_entry sysvmsg_functions[] = {
|
||||
PHP_FE(msg_get_queue, arginfo_msg_get_queue)
|
||||
PHP_FE(msg_send, arginfo_msg_send)
|
||||
PHP_FE(msg_receive, arginfo_msg_receive)
|
||||
PHP_FE(msg_remove_queue, arginfo_msg_remove_queue)
|
||||
PHP_FE(msg_stat_queue, arginfo_msg_stat_queue)
|
||||
PHP_FE(msg_set_queue, arginfo_msg_set_queue)
|
||||
PHP_FE(msg_queue_exists, arginfo_msg_queue_exists)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ sysvmsg_module_entry
|
||||
*/
|
||||
zend_module_entry sysvmsg_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"sysvmsg",
|
||||
sysvmsg_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(sysvmsg),
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
/** @return resource|false */
|
||||
function msg_get_queue(int $key, int $perms = 0666) {}
|
||||
|
||||
|
||||
@@ -41,3 +41,24 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_queue_exists, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(msg_get_queue);
|
||||
ZEND_FUNCTION(msg_send);
|
||||
ZEND_FUNCTION(msg_receive);
|
||||
ZEND_FUNCTION(msg_remove_queue);
|
||||
ZEND_FUNCTION(msg_stat_queue);
|
||||
ZEND_FUNCTION(msg_set_queue);
|
||||
ZEND_FUNCTION(msg_queue_exists);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(msg_get_queue, arginfo_msg_get_queue)
|
||||
ZEND_FE(msg_send, arginfo_msg_send)
|
||||
ZEND_FE(msg_receive, arginfo_msg_receive)
|
||||
ZEND_FE(msg_remove_queue, arginfo_msg_remove_queue)
|
||||
ZEND_FE(msg_stat_queue, arginfo_msg_stat_queue)
|
||||
ZEND_FE(msg_set_queue, arginfo_msg_set_queue)
|
||||
ZEND_FE(msg_queue_exists, arginfo_msg_queue_exists)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -54,23 +54,12 @@ union semun {
|
||||
|
||||
#endif
|
||||
|
||||
/* {{{ sysvsem_functions[]
|
||||
*/
|
||||
static const zend_function_entry sysvsem_functions[] = {
|
||||
PHP_FE(sem_get, arginfo_sem_get)
|
||||
PHP_FE(sem_acquire, arginfo_sem_acquire)
|
||||
PHP_FE(sem_release, arginfo_sem_release)
|
||||
PHP_FE(sem_remove, arginfo_sem_remove)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ sysvsem_module_entry
|
||||
*/
|
||||
zend_module_entry sysvsem_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"sysvsem",
|
||||
sysvsem_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(sysvsem),
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
/**
|
||||
* @todo use bool for $auto_release
|
||||
* @return resource|false
|
||||
|
||||
@@ -17,3 +17,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_release, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_sem_remove arginfo_sem_release
|
||||
|
||||
|
||||
ZEND_FUNCTION(sem_get);
|
||||
ZEND_FUNCTION(sem_acquire);
|
||||
ZEND_FUNCTION(sem_release);
|
||||
ZEND_FUNCTION(sem_remove);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(sem_get, arginfo_sem_get)
|
||||
ZEND_FE(sem_acquire, arginfo_sem_acquire)
|
||||
ZEND_FE(sem_release, arginfo_sem_release)
|
||||
ZEND_FE(sem_remove, arginfo_sem_remove)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -68,13 +68,6 @@ typedef struct {
|
||||
|
||||
PHP_MINIT_FUNCTION(sysvshm);
|
||||
PHP_MINFO_FUNCTION(sysvshm);
|
||||
PHP_FUNCTION(shm_attach);
|
||||
PHP_FUNCTION(shm_detach);
|
||||
PHP_FUNCTION(shm_remove);
|
||||
PHP_FUNCTION(shm_put_var);
|
||||
PHP_FUNCTION(shm_get_var);
|
||||
PHP_FUNCTION(shm_has_var);
|
||||
PHP_FUNCTION(shm_remove_var);
|
||||
|
||||
extern sysvshm_module php_sysvshm;
|
||||
|
||||
|
||||
@@ -37,26 +37,12 @@
|
||||
#include "zend_smart_str.h"
|
||||
#include "php_ini.h"
|
||||
|
||||
/* {{{ sysvshm_functions[]
|
||||
*/
|
||||
static const zend_function_entry sysvshm_functions[] = {
|
||||
PHP_FE(shm_attach, arginfo_shm_attach)
|
||||
PHP_FE(shm_remove, arginfo_shm_detach)
|
||||
PHP_FE(shm_detach, arginfo_shm_remove)
|
||||
PHP_FE(shm_put_var, arginfo_shm_put_var)
|
||||
PHP_FE(shm_has_var, arginfo_shm_has_var)
|
||||
PHP_FE(shm_get_var, arginfo_shm_get_var)
|
||||
PHP_FE(shm_remove_var, arginfo_shm_remove_var)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ sysvshm_module_entry
|
||||
*/
|
||||
zend_module_entry sysvshm_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"sysvshm",
|
||||
sysvshm_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(sysvshm),
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
/** @return resource|false */
|
||||
function shm_attach(int $key, int $memsize = UNKNOWN, int $perm = 0666) {}
|
||||
|
||||
|
||||
@@ -29,3 +29,24 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_shm_get_var, 0, 0, 2)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_shm_remove_var arginfo_shm_has_var
|
||||
|
||||
|
||||
ZEND_FUNCTION(shm_attach);
|
||||
ZEND_FUNCTION(shm_detach);
|
||||
ZEND_FUNCTION(shm_has_var);
|
||||
ZEND_FUNCTION(shm_remove);
|
||||
ZEND_FUNCTION(shm_put_var);
|
||||
ZEND_FUNCTION(shm_get_var);
|
||||
ZEND_FUNCTION(shm_remove_var);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(shm_attach, arginfo_shm_attach)
|
||||
ZEND_FE(shm_detach, arginfo_shm_detach)
|
||||
ZEND_FE(shm_has_var, arginfo_shm_has_var)
|
||||
ZEND_FE(shm_remove, arginfo_shm_remove)
|
||||
ZEND_FE(shm_put_var, arginfo_shm_put_var)
|
||||
ZEND_FE(shm_get_var, arginfo_shm_get_var)
|
||||
ZEND_FE(shm_remove_var, arginfo_shm_remove_var)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -152,29 +152,6 @@ PHP_MINIT_FUNCTION(xml);
|
||||
PHP_MINFO_FUNCTION(xml);
|
||||
static PHP_GINIT_FUNCTION(xml);
|
||||
|
||||
PHP_FUNCTION(xml_parser_create);
|
||||
PHP_FUNCTION(xml_parser_create_ns);
|
||||
PHP_FUNCTION(xml_set_object);
|
||||
PHP_FUNCTION(xml_set_element_handler);
|
||||
PHP_FUNCTION(xml_set_character_data_handler);
|
||||
PHP_FUNCTION(xml_set_processing_instruction_handler);
|
||||
PHP_FUNCTION(xml_set_default_handler);
|
||||
PHP_FUNCTION(xml_set_unparsed_entity_decl_handler);
|
||||
PHP_FUNCTION(xml_set_notation_decl_handler);
|
||||
PHP_FUNCTION(xml_set_external_entity_ref_handler);
|
||||
PHP_FUNCTION(xml_set_start_namespace_decl_handler);
|
||||
PHP_FUNCTION(xml_set_end_namespace_decl_handler);
|
||||
PHP_FUNCTION(xml_parse);
|
||||
PHP_FUNCTION(xml_get_error_code);
|
||||
PHP_FUNCTION(xml_error_string);
|
||||
PHP_FUNCTION(xml_get_current_line_number);
|
||||
PHP_FUNCTION(xml_get_current_column_number);
|
||||
PHP_FUNCTION(xml_get_current_byte_index);
|
||||
PHP_FUNCTION(xml_parser_free);
|
||||
PHP_FUNCTION(xml_parser_set_option);
|
||||
PHP_FUNCTION(xml_parser_get_option);
|
||||
PHP_FUNCTION(xml_parse_into_struct);
|
||||
|
||||
static zend_object *xml_parser_create_object(zend_class_entry *class_type);
|
||||
static void xml_parser_free_obj(zend_object *object);
|
||||
static HashTable *xml_parser_get_gc(zend_object *object, zval **table, int *n);
|
||||
@@ -205,33 +182,6 @@ void _xml_startNamespaceDeclHandler(void *, const XML_Char *, const XML_Char *);
|
||||
void _xml_endNamespaceDeclHandler(void *, const XML_Char *);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ extension definition structures */
|
||||
static const zend_function_entry xml_functions[] = {
|
||||
PHP_FE(xml_parser_create, arginfo_xml_parser_create)
|
||||
PHP_FE(xml_parser_create_ns, arginfo_xml_parser_create_ns)
|
||||
PHP_FE(xml_set_object, arginfo_xml_set_object)
|
||||
PHP_FE(xml_set_element_handler, arginfo_xml_set_element_handler)
|
||||
PHP_FE(xml_set_character_data_handler, arginfo_xml_set_character_data_handler)
|
||||
PHP_FE(xml_set_processing_instruction_handler, arginfo_xml_set_processing_instruction_handler)
|
||||
PHP_FE(xml_set_default_handler, arginfo_xml_set_default_handler)
|
||||
PHP_FE(xml_set_unparsed_entity_decl_handler,arginfo_xml_set_unparsed_entity_decl_handler)
|
||||
PHP_FE(xml_set_notation_decl_handler, arginfo_xml_set_notation_decl_handler)
|
||||
PHP_FE(xml_set_external_entity_ref_handler, arginfo_xml_set_external_entity_ref_handler)
|
||||
PHP_FE(xml_set_start_namespace_decl_handler,arginfo_xml_set_start_namespace_decl_handler)
|
||||
PHP_FE(xml_set_end_namespace_decl_handler, arginfo_xml_set_end_namespace_decl_handler)
|
||||
PHP_FE(xml_parse, arginfo_xml_parse)
|
||||
PHP_FE(xml_parse_into_struct, arginfo_xml_parse_into_struct)
|
||||
PHP_FE(xml_get_error_code, arginfo_xml_get_error_code)
|
||||
PHP_FE(xml_error_string, arginfo_xml_error_string)
|
||||
PHP_FE(xml_get_current_line_number, arginfo_xml_get_current_line_number)
|
||||
PHP_FE(xml_get_current_column_number, arginfo_xml_get_current_column_number)
|
||||
PHP_FE(xml_get_current_byte_index, arginfo_xml_get_current_byte_index)
|
||||
PHP_FE(xml_parser_free, arginfo_xml_parser_free)
|
||||
PHP_FE(xml_parser_set_option, arginfo_xml_parser_set_option)
|
||||
PHP_FE(xml_parser_get_option, arginfo_xml_parser_get_option)
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
#ifdef LIBXML_EXPAT_COMPAT
|
||||
static const zend_module_dep xml_deps[] = {
|
||||
ZEND_MOD_REQUIRED("libxml")
|
||||
@@ -247,7 +197,7 @@ zend_module_entry xml_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
#endif
|
||||
"xml", /* extension name */
|
||||
xml_functions, /* extension function list */
|
||||
ext_functions, /* extension function list */
|
||||
PHP_MINIT(xml), /* extension-wide startup function */
|
||||
NULL, /* extension-wide shutdown function */
|
||||
NULL, /* per-request startup function */
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function xml_parser_create(string $encoding = UNKNOWN): XmlParser|false {}
|
||||
|
||||
function xml_parser_create_ns(string $encoding = UNKNOWN, string $sep = ':'): XmlParser|false {}
|
||||
|
||||
@@ -80,3 +80,54 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_xml_parser_get_option, 0, 2, MAY
|
||||
ZEND_ARG_OBJ_INFO(0, parser, XmlParser, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(xml_parser_create);
|
||||
ZEND_FUNCTION(xml_parser_create_ns);
|
||||
ZEND_FUNCTION(xml_set_object);
|
||||
ZEND_FUNCTION(xml_set_element_handler);
|
||||
ZEND_FUNCTION(xml_set_character_data_handler);
|
||||
ZEND_FUNCTION(xml_set_processing_instruction_handler);
|
||||
ZEND_FUNCTION(xml_set_default_handler);
|
||||
ZEND_FUNCTION(xml_set_unparsed_entity_decl_handler);
|
||||
ZEND_FUNCTION(xml_set_notation_decl_handler);
|
||||
ZEND_FUNCTION(xml_set_external_entity_ref_handler);
|
||||
ZEND_FUNCTION(xml_set_start_namespace_decl_handler);
|
||||
ZEND_FUNCTION(xml_set_end_namespace_decl_handler);
|
||||
ZEND_FUNCTION(xml_parse);
|
||||
ZEND_FUNCTION(xml_parse_into_struct);
|
||||
ZEND_FUNCTION(xml_get_error_code);
|
||||
ZEND_FUNCTION(xml_error_string);
|
||||
ZEND_FUNCTION(xml_get_current_line_number);
|
||||
ZEND_FUNCTION(xml_get_current_column_number);
|
||||
ZEND_FUNCTION(xml_get_current_byte_index);
|
||||
ZEND_FUNCTION(xml_parser_free);
|
||||
ZEND_FUNCTION(xml_parser_set_option);
|
||||
ZEND_FUNCTION(xml_parser_get_option);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(xml_parser_create, arginfo_xml_parser_create)
|
||||
ZEND_FE(xml_parser_create_ns, arginfo_xml_parser_create_ns)
|
||||
ZEND_FE(xml_set_object, arginfo_xml_set_object)
|
||||
ZEND_FE(xml_set_element_handler, arginfo_xml_set_element_handler)
|
||||
ZEND_FE(xml_set_character_data_handler, arginfo_xml_set_character_data_handler)
|
||||
ZEND_FE(xml_set_processing_instruction_handler, arginfo_xml_set_processing_instruction_handler)
|
||||
ZEND_FE(xml_set_default_handler, arginfo_xml_set_default_handler)
|
||||
ZEND_FE(xml_set_unparsed_entity_decl_handler, arginfo_xml_set_unparsed_entity_decl_handler)
|
||||
ZEND_FE(xml_set_notation_decl_handler, arginfo_xml_set_notation_decl_handler)
|
||||
ZEND_FE(xml_set_external_entity_ref_handler, arginfo_xml_set_external_entity_ref_handler)
|
||||
ZEND_FE(xml_set_start_namespace_decl_handler, arginfo_xml_set_start_namespace_decl_handler)
|
||||
ZEND_FE(xml_set_end_namespace_decl_handler, arginfo_xml_set_end_namespace_decl_handler)
|
||||
ZEND_FE(xml_parse, arginfo_xml_parse)
|
||||
ZEND_FE(xml_parse_into_struct, arginfo_xml_parse_into_struct)
|
||||
ZEND_FE(xml_get_error_code, arginfo_xml_get_error_code)
|
||||
ZEND_FE(xml_error_string, arginfo_xml_error_string)
|
||||
ZEND_FE(xml_get_current_line_number, arginfo_xml_get_current_line_number)
|
||||
ZEND_FE(xml_get_current_column_number, arginfo_xml_get_current_column_number)
|
||||
ZEND_FE(xml_get_current_byte_index, arginfo_xml_get_current_byte_index)
|
||||
ZEND_FE(xml_parser_free, arginfo_xml_parser_free)
|
||||
ZEND_FE(xml_parser_set_option, arginfo_xml_parser_set_option)
|
||||
ZEND_FE(xml_parser_get_option, arginfo_xml_parser_get_option)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -63,21 +63,6 @@ extern zend_module_entry xmlrpc_module_entry;
|
||||
PHP_MINIT_FUNCTION(xmlrpc);
|
||||
PHP_MINFO_FUNCTION(xmlrpc);
|
||||
|
||||
PHP_FUNCTION(xmlrpc_encode);
|
||||
PHP_FUNCTION(xmlrpc_decode);
|
||||
PHP_FUNCTION(xmlrpc_decode_request);
|
||||
PHP_FUNCTION(xmlrpc_encode_request);
|
||||
PHP_FUNCTION(xmlrpc_get_type);
|
||||
PHP_FUNCTION(xmlrpc_set_type);
|
||||
PHP_FUNCTION(xmlrpc_is_fault);
|
||||
PHP_FUNCTION(xmlrpc_server_create);
|
||||
PHP_FUNCTION(xmlrpc_server_destroy);
|
||||
PHP_FUNCTION(xmlrpc_server_register_method);
|
||||
PHP_FUNCTION(xmlrpc_server_call_method);
|
||||
PHP_FUNCTION(xmlrpc_parse_method_descriptions);
|
||||
PHP_FUNCTION(xmlrpc_server_add_introspection_data);
|
||||
PHP_FUNCTION(xmlrpc_server_register_introspection_callback);
|
||||
|
||||
#else
|
||||
|
||||
#define phpext_xmlrpc_ptr NULL
|
||||
|
||||
@@ -72,28 +72,10 @@
|
||||
|
||||
static int le_xmlrpc_server;
|
||||
|
||||
static const zend_function_entry xmlrpc_functions[] = {
|
||||
PHP_FE(xmlrpc_encode, arginfo_xmlrpc_encode)
|
||||
PHP_FE(xmlrpc_decode, arginfo_xmlrpc_decode)
|
||||
PHP_FE(xmlrpc_decode_request, arginfo_xmlrpc_decode_request)
|
||||
PHP_FE(xmlrpc_encode_request, arginfo_xmlrpc_encode_request)
|
||||
PHP_FE(xmlrpc_get_type, arginfo_xmlrpc_encode)
|
||||
PHP_FE(xmlrpc_set_type, arginfo_xmlrpc_set_type)
|
||||
PHP_FE(xmlrpc_is_fault, arginfo_xmlrpc_is_fault)
|
||||
PHP_FE(xmlrpc_server_create, arginfo_xmlrpc_server_create)
|
||||
PHP_FE(xmlrpc_server_destroy, arginfo_xmlrpc_server_destroy)
|
||||
PHP_FE(xmlrpc_server_register_method, arginfo_xmlrpc_server_register_method)
|
||||
PHP_FE(xmlrpc_server_call_method, arginfo_xmlrpc_server_call_method)
|
||||
PHP_FE(xmlrpc_parse_method_descriptions, arginfo_xmlrpc_parse_method_descriptions)
|
||||
PHP_FE(xmlrpc_server_add_introspection_data, arginfo_xmlrpc_server_add_introspection_data)
|
||||
PHP_FE(xmlrpc_server_register_introspection_callback, arginfo_xmlrpc_server_register_introspection_callback)
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
zend_module_entry xmlrpc_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"xmlrpc",
|
||||
xmlrpc_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(xmlrpc),
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function xmlrpc_encode($value): ?string {}
|
||||
|
||||
/** @return mixed */
|
||||
|
||||
@@ -67,3 +67,38 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlrpc_server_register_introspec
|
||||
ZEND_ARG_INFO(0, server)
|
||||
ZEND_ARG_INFO(0, function)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(xmlrpc_encode);
|
||||
ZEND_FUNCTION(xmlrpc_decode);
|
||||
ZEND_FUNCTION(xmlrpc_decode_request);
|
||||
ZEND_FUNCTION(xmlrpc_encode_request);
|
||||
ZEND_FUNCTION(xmlrpc_get_type);
|
||||
ZEND_FUNCTION(xmlrpc_set_type);
|
||||
ZEND_FUNCTION(xmlrpc_is_fault);
|
||||
ZEND_FUNCTION(xmlrpc_server_create);
|
||||
ZEND_FUNCTION(xmlrpc_server_destroy);
|
||||
ZEND_FUNCTION(xmlrpc_server_register_method);
|
||||
ZEND_FUNCTION(xmlrpc_server_call_method);
|
||||
ZEND_FUNCTION(xmlrpc_parse_method_descriptions);
|
||||
ZEND_FUNCTION(xmlrpc_server_add_introspection_data);
|
||||
ZEND_FUNCTION(xmlrpc_server_register_introspection_callback);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(xmlrpc_encode, arginfo_xmlrpc_encode)
|
||||
ZEND_FE(xmlrpc_decode, arginfo_xmlrpc_decode)
|
||||
ZEND_FE(xmlrpc_decode_request, arginfo_xmlrpc_decode_request)
|
||||
ZEND_FE(xmlrpc_encode_request, arginfo_xmlrpc_encode_request)
|
||||
ZEND_FE(xmlrpc_get_type, arginfo_xmlrpc_get_type)
|
||||
ZEND_FE(xmlrpc_set_type, arginfo_xmlrpc_set_type)
|
||||
ZEND_FE(xmlrpc_is_fault, arginfo_xmlrpc_is_fault)
|
||||
ZEND_FE(xmlrpc_server_create, arginfo_xmlrpc_server_create)
|
||||
ZEND_FE(xmlrpc_server_destroy, arginfo_xmlrpc_server_destroy)
|
||||
ZEND_FE(xmlrpc_server_register_method, arginfo_xmlrpc_server_register_method)
|
||||
ZEND_FE(xmlrpc_server_call_method, arginfo_xmlrpc_server_call_method)
|
||||
ZEND_FE(xmlrpc_parse_method_descriptions, arginfo_xmlrpc_parse_method_descriptions)
|
||||
ZEND_FE(xmlrpc_server_add_introspection_data, arginfo_xmlrpc_server_add_introspection_data)
|
||||
ZEND_FE(xmlrpc_server_register_introspection_callback, arginfo_xmlrpc_server_register_introspection_callback)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "SAPI.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "ext/standard/file.h"
|
||||
#include "ext/standard/php_string.h"
|
||||
#include "php_zlib.h"
|
||||
#include "zlib_arginfo.h"
|
||||
@@ -474,7 +473,7 @@ static void php_zlib_cleanup_ob_gzhandler_mess(void)
|
||||
|
||||
/* {{{ proto string ob_gzhandler(string data, int flags)
|
||||
Legacy hack */
|
||||
static PHP_FUNCTION(ob_gzhandler)
|
||||
PHP_FUNCTION(ob_gzhandler)
|
||||
{
|
||||
char *in_str;
|
||||
size_t in_len;
|
||||
@@ -541,7 +540,7 @@ static PHP_FUNCTION(ob_gzhandler)
|
||||
|
||||
/* {{{ proto string zlib_get_coding_type(void)
|
||||
Returns the coding type used for output compression */
|
||||
static PHP_FUNCTION(zlib_get_coding_type)
|
||||
PHP_FUNCTION(zlib_get_coding_type)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -559,7 +558,7 @@ static PHP_FUNCTION(zlib_get_coding_type)
|
||||
|
||||
/* {{{ proto array gzfile(string filename [, int use_include_path])
|
||||
Read and uncompress entire .gz-file into an array */
|
||||
static PHP_FUNCTION(gzfile)
|
||||
PHP_FUNCTION(gzfile)
|
||||
{
|
||||
char *filename;
|
||||
size_t filename_len;
|
||||
@@ -600,7 +599,7 @@ static PHP_FUNCTION(gzfile)
|
||||
|
||||
/* {{{ proto resource gzopen(string filename, string mode [, int use_include_path])
|
||||
Open a .gz-file and return a .gz-file pointer */
|
||||
static PHP_FUNCTION(gzopen)
|
||||
PHP_FUNCTION(gzopen)
|
||||
{
|
||||
char *filename;
|
||||
char *mode;
|
||||
@@ -628,7 +627,7 @@ static PHP_FUNCTION(gzopen)
|
||||
|
||||
/* {{{ proto int readgzfile(string filename [, int use_include_path])
|
||||
Output a .gz-file */
|
||||
static PHP_FUNCTION(readgzfile)
|
||||
PHP_FUNCTION(readgzfile)
|
||||
{
|
||||
char *filename;
|
||||
size_t filename_len;
|
||||
@@ -657,7 +656,7 @@ static PHP_FUNCTION(readgzfile)
|
||||
/* }}} */
|
||||
|
||||
#define PHP_ZLIB_ENCODE_FUNC(name, default_encoding) \
|
||||
static PHP_FUNCTION(name) \
|
||||
PHP_FUNCTION(name) \
|
||||
{ \
|
||||
zend_string *in, *out; \
|
||||
zend_long level = -1; \
|
||||
@@ -691,7 +690,7 @@ static PHP_FUNCTION(name) \
|
||||
}
|
||||
|
||||
#define PHP_ZLIB_DECODE_FUNC(name, encoding) \
|
||||
static PHP_FUNCTION(name) \
|
||||
PHP_FUNCTION(name) \
|
||||
{ \
|
||||
char *in_buf, *out_buf; \
|
||||
size_t in_len; \
|
||||
@@ -1246,42 +1245,6 @@ ZEND_TSRMLS_CACHE_DEFINE()
|
||||
ZEND_GET_MODULE(php_zlib)
|
||||
#endif
|
||||
|
||||
/* {{{ php_zlib_functions[] */
|
||||
static const zend_function_entry php_zlib_functions[] = {
|
||||
PHP_FE(readgzfile, arginfo_readgzfile)
|
||||
PHP_FALIAS(gzrewind, rewind, arginfo_gzrewind)
|
||||
PHP_FALIAS(gzclose, fclose, arginfo_gzclose)
|
||||
PHP_FALIAS(gzeof, feof, arginfo_gzeof)
|
||||
PHP_FALIAS(gzgetc, fgetc, arginfo_gzgetc)
|
||||
PHP_FALIAS(gzgets, fgets, arginfo_gzgets)
|
||||
PHP_FALIAS(gzread, fread, arginfo_gzread)
|
||||
PHP_FE(gzopen, arginfo_gzopen)
|
||||
PHP_FALIAS(gzpassthru, fpassthru, arginfo_gzpassthru)
|
||||
PHP_FALIAS(gzseek, fseek, arginfo_gzseek)
|
||||
PHP_FALIAS(gztell, ftell, arginfo_gztell)
|
||||
PHP_FALIAS(gzwrite, fwrite, arginfo_gzwrite)
|
||||
PHP_FALIAS(gzputs, fwrite, arginfo_gzputs)
|
||||
PHP_FE(gzfile, arginfo_gzfile)
|
||||
PHP_FE(gzcompress, arginfo_gzcompress)
|
||||
PHP_FE(gzuncompress, arginfo_gzuncompress)
|
||||
PHP_FE(gzdeflate, arginfo_gzdeflate)
|
||||
PHP_FE(gzinflate, arginfo_gzinflate)
|
||||
PHP_FE(gzencode, arginfo_gzencode)
|
||||
PHP_FE(gzdecode, arginfo_gzdecode)
|
||||
PHP_FE(zlib_encode, arginfo_zlib_encode)
|
||||
PHP_FE(zlib_decode, arginfo_zlib_decode)
|
||||
PHP_FE(zlib_get_coding_type, arginfo_zlib_get_coding_type)
|
||||
PHP_FE(deflate_init, arginfo_deflate_init)
|
||||
PHP_FE(deflate_add, arginfo_deflate_add)
|
||||
PHP_FE(inflate_init, arginfo_inflate_init)
|
||||
PHP_FE(inflate_add, arginfo_inflate_add)
|
||||
PHP_FE(inflate_get_status, arginfo_inflate_get_status)
|
||||
PHP_FE(inflate_get_read_len, arginfo_inflate_get_read_len)
|
||||
PHP_FE(ob_gzhandler, arginfo_ob_gzhandler)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ OnUpdate_zlib_output_compression */
|
||||
static PHP_INI_MH(OnUpdate_zlib_output_compression)
|
||||
{
|
||||
@@ -1472,7 +1435,7 @@ static PHP_GINIT_FUNCTION(zlib)
|
||||
zend_module_entry php_zlib_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"zlib",
|
||||
php_zlib_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT(zlib),
|
||||
PHP_MSHUTDOWN(zlib),
|
||||
PHP_RINIT(zlib),
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
function ob_gzhandler(string $data, int $flags): string|false {}
|
||||
|
||||
function zlib_get_coding_type(): string|false {}
|
||||
|
||||
@@ -119,3 +119,69 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_inflate_get_status, 0, 1, IS_LON
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_inflate_get_read_len arginfo_inflate_get_status
|
||||
|
||||
|
||||
ZEND_FUNCTION(ob_gzhandler);
|
||||
ZEND_FUNCTION(zlib_get_coding_type);
|
||||
ZEND_FUNCTION(gzfile);
|
||||
ZEND_FUNCTION(gzopen);
|
||||
ZEND_FUNCTION(readgzfile);
|
||||
ZEND_FUNCTION(zlib_encode);
|
||||
ZEND_FUNCTION(zlib_decode);
|
||||
ZEND_FUNCTION(gzdeflate);
|
||||
ZEND_FUNCTION(gzencode);
|
||||
ZEND_FUNCTION(gzcompress);
|
||||
ZEND_FUNCTION(gzinflate);
|
||||
ZEND_FUNCTION(gzdecode);
|
||||
ZEND_FUNCTION(gzuncompress);
|
||||
ZEND_FUNCTION(fwrite);
|
||||
ZEND_FUNCTION(rewind);
|
||||
ZEND_FUNCTION(fclose);
|
||||
ZEND_FUNCTION(feof);
|
||||
ZEND_FUNCTION(fgetc);
|
||||
ZEND_FUNCTION(fpassthru);
|
||||
ZEND_FUNCTION(fseek);
|
||||
ZEND_FUNCTION(ftell);
|
||||
ZEND_FUNCTION(fread);
|
||||
ZEND_FUNCTION(fgets);
|
||||
ZEND_FUNCTION(deflate_init);
|
||||
ZEND_FUNCTION(deflate_add);
|
||||
ZEND_FUNCTION(inflate_init);
|
||||
ZEND_FUNCTION(inflate_add);
|
||||
ZEND_FUNCTION(inflate_get_status);
|
||||
ZEND_FUNCTION(inflate_get_read_len);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(ob_gzhandler, arginfo_ob_gzhandler)
|
||||
ZEND_FE(zlib_get_coding_type, arginfo_zlib_get_coding_type)
|
||||
ZEND_FE(gzfile, arginfo_gzfile)
|
||||
ZEND_FE(gzopen, arginfo_gzopen)
|
||||
ZEND_FE(readgzfile, arginfo_readgzfile)
|
||||
ZEND_FE(zlib_encode, arginfo_zlib_encode)
|
||||
ZEND_FE(zlib_decode, arginfo_zlib_decode)
|
||||
ZEND_FE(gzdeflate, arginfo_gzdeflate)
|
||||
ZEND_FE(gzencode, arginfo_gzencode)
|
||||
ZEND_FE(gzcompress, arginfo_gzcompress)
|
||||
ZEND_FE(gzinflate, arginfo_gzinflate)
|
||||
ZEND_FE(gzdecode, arginfo_gzdecode)
|
||||
ZEND_FE(gzuncompress, arginfo_gzuncompress)
|
||||
ZEND_FALIAS(gzwrite, fwrite, arginfo_gzwrite)
|
||||
ZEND_FALIAS(gzputs, fwrite, arginfo_gzputs)
|
||||
ZEND_FALIAS(gzrewind, rewind, arginfo_gzrewind)
|
||||
ZEND_FALIAS(gzclose, fclose, arginfo_gzclose)
|
||||
ZEND_FALIAS(gzeof, feof, arginfo_gzeof)
|
||||
ZEND_FALIAS(gzgetc, fgetc, arginfo_gzgetc)
|
||||
ZEND_FALIAS(gzpassthru, fpassthru, arginfo_gzpassthru)
|
||||
ZEND_FALIAS(gzseek, fseek, arginfo_gzseek)
|
||||
ZEND_FALIAS(gztell, ftell, arginfo_gztell)
|
||||
ZEND_FALIAS(gzread, fread, arginfo_gzread)
|
||||
ZEND_FALIAS(gzgets, fgets, arginfo_gzgets)
|
||||
ZEND_FE(deflate_init, arginfo_deflate_init)
|
||||
ZEND_FE(deflate_add, arginfo_deflate_add)
|
||||
ZEND_FE(inflate_init, arginfo_inflate_init)
|
||||
ZEND_FE(inflate_add, arginfo_inflate_add)
|
||||
ZEND_FE(inflate_get_status, arginfo_inflate_get_status)
|
||||
ZEND_FE(inflate_get_read_len, arginfo_inflate_get_read_len)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -98,6 +98,17 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
|
||||
}
|
||||
- Return [ array|string|null ]
|
||||
}
|
||||
Function [ <internal:pcre> function preg_filter ] {
|
||||
|
||||
- Parameters [5] {
|
||||
Parameter #0 [ <required> $regex ]
|
||||
Parameter #1 [ <required> $replace ]
|
||||
Parameter #2 [ <required> $subject ]
|
||||
Parameter #3 [ <optional> int $limit ]
|
||||
Parameter #4 [ <optional> &$count ]
|
||||
}
|
||||
- Return [ array|string|null ]
|
||||
}
|
||||
Function [ <internal:pcre> function preg_replace_callback ] {
|
||||
|
||||
- Parameters [6] {
|
||||
@@ -121,17 +132,6 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
|
||||
}
|
||||
- Return [ array|string|null ]
|
||||
}
|
||||
Function [ <internal:pcre> function preg_filter ] {
|
||||
|
||||
- Parameters [5] {
|
||||
Parameter #0 [ <required> $regex ]
|
||||
Parameter #1 [ <required> $replace ]
|
||||
Parameter #2 [ <required> $subject ]
|
||||
Parameter #3 [ <optional> int $limit ]
|
||||
Parameter #4 [ <optional> &$count ]
|
||||
}
|
||||
- Return [ array|string|null ]
|
||||
}
|
||||
Function [ <internal:pcre> function preg_split ] {
|
||||
|
||||
- Parameters [4] {
|
||||
|
||||
Reference in New Issue
Block a user