From: Máté Kocsis Date: Sat, 11 Apr 2020 23:49:13 +0000 (+0200) Subject: Generate method entries for ext/xsl X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68a56483ea5794ac0d683968457dec9fa8a85b5f;p=php Generate method entries for ext/xsl Closes GH-5372 --- diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index da67e9ea64..63974643bc 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -22,6 +22,7 @@ #include "php_ini.h" #include "ext/standard/info.h" #include "php_xsl.h" +#include "php_xsl_arginfo.h" zend_class_entry *xsl_xsltprocessor_class_entry; static zend_object_handlers xsl_object_handlers; @@ -129,7 +130,7 @@ PHP_MINIT_FUNCTION(xsl) xsl_object_handlers.clone_obj = NULL; xsl_object_handlers.free_obj = xsl_objects_free_storage; - REGISTER_XSL_CLASS(ce, "XSLTProcessor", NULL, php_xsl_xsltprocessor_class_functions, xsl_xsltprocessor_class_entry); + REGISTER_XSL_CLASS(ce, "XSLTProcessor", NULL, class_XSLTProcessor_methods, xsl_xsltprocessor_class_entry); #if HAVE_XSL_EXSLT exsltRegisterAll(); #endif diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index 0d105ce2a0..94d4409b36 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -38,7 +38,6 @@ extern zend_module_entry xsl_module_entry; #endif #include "../dom/xml_common.h" -#include "xsl_fe.h" #include #include diff --git a/ext/xsl/xsltprocessor.stub.php b/ext/xsl/php_xsl.stub.php similarity index 97% rename from ext/xsl/xsltprocessor.stub.php rename to ext/xsl/php_xsl.stub.php index 8b4dcd1697..23f187fbdd 100644 --- a/ext/xsl/xsltprocessor.stub.php +++ b/ext/xsl/php_xsl.stub.php @@ -1,5 +1,7 @@ | - +----------------------------------------------------------------------+ -*/ - -#ifndef XSL_FE_H -#define XSL_FE_H - -extern const zend_function_entry php_xsl_xsltprocessor_class_functions[]; -extern zend_class_entry *xsl_xsltprocessor_class_entry; - -PHP_METHOD(XSLTProcessor, importStylesheet); -PHP_METHOD(XSLTProcessor, transformToDoc); -PHP_METHOD(XSLTProcessor, transformToUri); -PHP_METHOD(XSLTProcessor, transformToXml); -PHP_METHOD(XSLTProcessor, setParameter); -PHP_METHOD(XSLTProcessor, getParameter); -PHP_METHOD(XSLTProcessor, removeParameter); -PHP_METHOD(XSLTProcessor, hasExsltSupport); -PHP_METHOD(XSLTProcessor, registerPHPFunctions); -PHP_METHOD(XSLTProcessor, setProfiling); -PHP_METHOD(XSLTProcessor, setSecurityPrefs); -PHP_METHOD(XSLTProcessor, getSecurityPrefs); - -#endif diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 539fe39e61..1ced2b7b74 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -21,32 +21,8 @@ #include "php.h" #include "php_xsl.h" -#include "xsltprocessor_arginfo.h" #include "ext/libxml/php_libxml.h" -/* -* class xsl_xsltprocessor -* -* URL: https://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# -* Since: -*/ - -const zend_function_entry php_xsl_xsltprocessor_class_functions[] = { - PHP_ME(XSLTProcessor, importStylesheet, arginfo_class_XSLTProcessor_importStylesheet, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, transformToDoc, arginfo_class_XSLTProcessor_transformToDoc, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, transformToUri, arginfo_class_XSLTProcessor_transformToUri, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, transformToXml, arginfo_class_XSLTProcessor_transformToXml, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, setParameter, arginfo_class_XSLTProcessor_setParameter, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, getParameter, arginfo_class_XSLTProcessor_getParameter, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, removeParameter, arginfo_class_XSLTProcessor_removeParameter, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, hasExsltSupport, arginfo_class_XSLTProcessor_hasExsltSupport, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, registerPHPFunctions, arginfo_class_XSLTProcessor_registerPHPFunctions, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, setProfiling, arginfo_class_XSLTProcessor_setProfiling, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, setSecurityPrefs, arginfo_class_XSLTProcessor_setSecurityPrefs, ZEND_ACC_PUBLIC) - PHP_ME(XSLTProcessor, getSecurityPrefs, arginfo_class_XSLTProcessor_getSecurityPrefs, ZEND_ACC_PUBLIC) - PHP_FE_END -}; - /* {{{ php_xsl_xslt_string_to_xpathexpr() Translates a string to a XPath Expression */ static char *php_xsl_xslt_string_to_xpathexpr(const char *str)