]> granicus.if.org Git - php/commitdiff
Add some stubs at ctype ext
authorVictor Gazotti <vtr.gomes@hotmail.com>
Wed, 14 Aug 2019 13:43:04 +0000 (15:43 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 14 Aug 2019 14:43:26 +0000 (16:43 +0200)
ext/ctype/ctype.c
ext/ctype/ctype.stub.php [new file with mode: 0644]
ext/ctype/ctype_arginfo.h [new file with mode: 0644]

index 9f7fd2fdfb6d5b4839476a8a09c5f28bc7ae43ba..cffad1a2da991c150e53506ded95e200073a4bea 100644 (file)
@@ -23,6 +23,7 @@
 #include "php.h"
 #include "php_ini.h"
 #include "php_ctype.h"
+#include "ctype_arginfo.h"
 #include "SAPI.h"
 #include "ext/standard/info.h"
 
@@ -43,52 +44,6 @@ static PHP_FUNCTION(ctype_punct);
 static PHP_FUNCTION(ctype_space);
 static PHP_FUNCTION(ctype_upper);
 static PHP_FUNCTION(ctype_xdigit);
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_alnum, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_alpha, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_cntrl, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_digit, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_lower, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_graph, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_print, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_punct, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_space, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_upper, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ctype_xdigit, _IS_BOOL, 0)
-       ZEND_ARG_INFO(0, text)
-ZEND_END_ARG_INFO()
-
 /* }}} */
 
 /* {{{ ctype_functions[]
diff --git a/ext/ctype/ctype.stub.php b/ext/ctype/ctype.stub.php
new file mode 100644 (file)
index 0000000..7bcc44e
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+function ctype_alnum($text): bool {}
+
+function ctype_alpha($text): bool {}
+
+function ctype_cntrl($text): bool {}
+
+function ctype_digit($text): bool {}
+
+function ctype_lower($text): bool {}
+
+function ctype_graph($text): bool {}
+
+function ctype_print($text): bool {}
+
+function ctype_punct($text): bool {}
+
+function ctype_space($text): bool {}
+
+function ctype_upper($text): bool {}
+
+function ctype_xdigit($text): bool {}
diff --git a/ext/ctype/ctype_arginfo.h b/ext/ctype/ctype_arginfo.h
new file mode 100644 (file)
index 0000000..d22d9d3
--- /dev/null
@@ -0,0 +1,25 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ctype_alnum, 0, 1, _IS_BOOL, 0)
+       ZEND_ARG_INFO(0, text)
+ZEND_END_ARG_INFO()
+
+#define arginfo_ctype_alpha arginfo_ctype_alnum
+
+#define arginfo_ctype_cntrl arginfo_ctype_alnum
+
+#define arginfo_ctype_digit arginfo_ctype_alnum
+
+#define arginfo_ctype_lower arginfo_ctype_alnum
+
+#define arginfo_ctype_graph arginfo_ctype_alnum
+
+#define arginfo_ctype_print arginfo_ctype_alnum
+
+#define arginfo_ctype_punct arginfo_ctype_alnum
+
+#define arginfo_ctype_space arginfo_ctype_alnum
+
+#define arginfo_ctype_upper arginfo_ctype_alnum
+
+#define arginfo_ctype_xdigit arginfo_ctype_alnum