com php-src: Convert phpdbg arginfo to php stubs: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg.stub.php sapi/phpdbg/phpdbg_arginfo.h
| From: | Nikita Popov | Date: | Tue, 29 Oct 2019 10:39:58 +0000 |
| Subject: | com php-src: Convert phpdbg arginfo to php stubs: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg.stub.php sapi/phpdbg/phpdbg_arginfo.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-109110@lists.php.net to get a copy of this message | ||
Commit: 1d631c18deec5d3c73345740ccc3bf2c30aadd66
Author: Craig Duncan <duncan3dc@php.net> Sun, 27 Oct 2019 21:46:11 +0000
Committer: Nikita Popov <nikita.ppv@gmail.com> Tue, 29 Oct 2019 11:39:58 +0100
Parents: 1c9cbc911d83a64d1dd7ef9c8d12b999d99cafdb
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1d631c18deec5d3c73345740ccc3bf2c30aadd66
Log:
Convert phpdbg arginfo to php stubs
Closes GH-4867.
Changed paths:
M sapi/phpdbg/phpdbg.c
A sapi/phpdbg/phpdbg.stub.php
A sapi/phpdbg/phpdbg_arginfo.h
Diff:
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 436adb23c43..cb0732ae5cf 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -28,6 +28,7 @@
#include "phpdbg_eol.h"
#include "phpdbg_print.h"
#include "phpdbg_help.h"
+#include "phpdbg_arginfo.h"
#include "ext/standard/basic_functions.h"
@@ -723,62 +724,18 @@ static PHP_FUNCTION(phpdbg_end_oplog)
}
}
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_break_next_arginfo, 0, 0, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_break_file_arginfo, 0, 0, 2)
- ZEND_ARG_INFO(0, file)
- ZEND_ARG_INFO(0, line)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_break_method_arginfo, 0, 0, 2)
- ZEND_ARG_INFO(0, class)
- ZEND_ARG_INFO(0, method)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_break_function_arginfo, 0, 0, 1)
- ZEND_ARG_INFO(0, function)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_color_arginfo, 0, 0, 2)
- ZEND_ARG_INFO(0, element)
- ZEND_ARG_INFO(0, color)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_prompt_arginfo, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_exec_arginfo, 0, 0, 1)
- ZEND_ARG_INFO(0, context)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_clear_arginfo, 0, 0, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_start_oplog_arginfo, 0, 0, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_end_oplog_arginfo, 0, 0, 0)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(phpdbg_get_executable_arginfo, 0, 0, 0)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO()
-
static const zend_function_entry phpdbg_user_functions[] = {
- PHP_FE(phpdbg_clear, phpdbg_clear_arginfo)
- PHP_FE(phpdbg_break_next, phpdbg_break_next_arginfo)
- PHP_FE(phpdbg_break_file, phpdbg_break_file_arginfo)
- PHP_FE(phpdbg_break_method, phpdbg_break_method_arginfo)
- PHP_FE(phpdbg_break_function, phpdbg_break_function_arginfo)
- PHP_FE(phpdbg_exec, phpdbg_exec_arginfo)
- PHP_FE(phpdbg_color, phpdbg_color_arginfo)
- PHP_FE(phpdbg_prompt, phpdbg_prompt_arginfo)
- PHP_FE(phpdbg_start_oplog, phpdbg_start_oplog_arginfo)
- PHP_FE(phpdbg_end_oplog, phpdbg_end_oplog_arginfo)
- PHP_FE(phpdbg_get_executable, phpdbg_get_executable_arginfo)
+ PHP_FE(phpdbg_clear, arginfo_phpdbg_clear)
+ PHP_FE(phpdbg_break_next, arginfo_phpdbg_break_next)
+ PHP_FE(phpdbg_break_file, arginfo_phpdbg_break_file)
+ PHP_FE(phpdbg_break_method, arginfo_phpdbg_break_method)
+ PHP_FE(phpdbg_break_function, arginfo_phpdbg_break_function)
+ PHP_FE(phpdbg_exec, arginfo_phpdbg_exec)
+ PHP_FE(phpdbg_color, arginfo_phpdbg_color)
+ PHP_FE(phpdbg_prompt, arginfo_phpdbg_prompt)
+ PHP_FE(phpdbg_start_oplog, arginfo_phpdbg_start_oplog)
+ PHP_FE(phpdbg_end_oplog, arginfo_phpdbg_end_oplog)
+ PHP_FE(phpdbg_get_executable, arginfo_phpdbg_get_executable)
#ifdef PHP_FE_END
PHP_FE_END
#else
diff --git a/sapi/phpdbg/phpdbg.stub.php b/sapi/phpdbg/phpdbg.stub.php
new file mode 100644
index 00000000000..cf6575de208
--- /dev/null
+++ b/sapi/phpdbg/phpdbg.stub.php
@@ -0,0 +1,24 @@
+<?php
+
+function phpdbg_break_next(): void {}
+
+function phpdbg_break_file(string $file, int $line): void {}
+
+function phpdbg_break_method(string $class, string $method): void {}
+
+function phpdbg_break_function(string $function): void {}
+
+function phpdbg_color(int $element, string $color): void {}
+
+function phpdbg_prompt(string $string): void {}
+
+/** @return string|bool */
+function phpdbg_exec(string $context) {}
+
+function phpdbg_clear(): void {}
+
+function phpdbg_start_oplog(): void {}
+
+function phpdbg_end_oplog(array $options = []): ?array {}
+
+function phpdbg_get_executable(array $options = []): array {}
diff --git a/sapi/phpdbg/phpdbg_arginfo.h b/sapi/phpdbg/phpdbg_arginfo.h
new file mode 100644
index 00000000000..c59f6ecf0f4
--- /dev/null
+++ b/sapi/phpdbg/phpdbg_arginfo.h
@@ -0,0 +1,43 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_break_next, 0, 0, IS_VOID, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_break_file, 0, 2, IS_VOID, 0)
+ ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, line, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_break_method, 0, 2, IS_VOID, 0)
+ ZEND_ARG_TYPE_INFO(0, class, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_break_function, 0, 1, IS_VOID, 0)
+ ZEND_ARG_TYPE_INFO(0, function, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_color, 0, 2, IS_VOID, 0)
+ ZEND_ARG_TYPE_INFO(0, element, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, color, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_prompt, 0, 1, IS_VOID, 0)
+ ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_phpdbg_exec, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, context, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_phpdbg_clear arginfo_phpdbg_break_next
+
+#define arginfo_phpdbg_start_oplog arginfo_phpdbg_break_next
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_end_oplog, 0, 0, IS_ARRAY, 1)
+ ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_get_executable, 0, 0, IS_ARRAY, 0)
+ ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()