mirror of
https://github.com/php/php-src.git
synced 2025-01-07 11:34:09 +08:00
Add ext/pspell arginfo stubs
This commit is contained in:
parent
49b98b4d5c
commit
e3abc534eb
@ -32,6 +32,7 @@
|
||||
#include "php_pspell.h"
|
||||
#include <pspell.h>
|
||||
#include "ext/standard/info.h"
|
||||
#include "pspell_arginfo.h"
|
||||
|
||||
#define PSPELL_FAST 1L
|
||||
#define PSPELL_NORMAL 2L
|
||||
@ -66,110 +67,6 @@ static PHP_FUNCTION(pspell_config_data_dir);
|
||||
static PHP_FUNCTION(pspell_config_repl);
|
||||
static PHP_FUNCTION(pspell_config_save_repl);
|
||||
|
||||
/* {{{ arginfo */
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, language)
|
||||
ZEND_ARG_INFO(0, spelling)
|
||||
ZEND_ARG_INFO(0, jargon)
|
||||
ZEND_ARG_INFO(0, encoding)
|
||||
ZEND_ARG_INFO(0, mode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new_personal, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, personal)
|
||||
ZEND_ARG_INFO(0, language)
|
||||
ZEND_ARG_INFO(0, spelling)
|
||||
ZEND_ARG_INFO(0, jargon)
|
||||
ZEND_ARG_INFO(0, encoding)
|
||||
ZEND_ARG_INFO(0, mode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new_config, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, config)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_check, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, pspell)
|
||||
ZEND_ARG_INFO(0, word)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_suggest, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, pspell)
|
||||
ZEND_ARG_INFO(0, word)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_store_replacement, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, pspell)
|
||||
ZEND_ARG_INFO(0, misspell)
|
||||
ZEND_ARG_INFO(0, correct)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_add_to_personal, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, pspell)
|
||||
ZEND_ARG_INFO(0, word)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_add_to_session, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, pspell)
|
||||
ZEND_ARG_INFO(0, word)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_clear_session, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, pspell)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_save_wordlist, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, pspell)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_create, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, language)
|
||||
ZEND_ARG_INFO(0, spelling)
|
||||
ZEND_ARG_INFO(0, jargon)
|
||||
ZEND_ARG_INFO(0, encoding)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_runtogether, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, conf)
|
||||
ZEND_ARG_INFO(0, runtogether)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_mode, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, conf)
|
||||
ZEND_ARG_INFO(0, mode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_ignore, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, conf)
|
||||
ZEND_ARG_INFO(0, ignore)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_personal, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, conf)
|
||||
ZEND_ARG_INFO(0, personal)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_dict_dir, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, conf)
|
||||
ZEND_ARG_INFO(0, directory)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_data_dir, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, conf)
|
||||
ZEND_ARG_INFO(0, directory)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_repl, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, conf)
|
||||
ZEND_ARG_INFO(0, repl)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_config_save_repl, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, conf)
|
||||
ZEND_ARG_INFO(0, save)
|
||||
ZEND_END_ARG_INFO()
|
||||
/* }}} */
|
||||
|
||||
/* {{{ pspell_functions[]
|
||||
*/
|
||||
static const zend_function_entry pspell_functions[] = {
|
||||
|
43
ext/pspell/pspell.stub.php
Normal file
43
ext/pspell/pspell.stub.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/** @return int|false */
|
||||
function pspell_new(string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN, int $mode = 0) {}
|
||||
|
||||
/** @return int|false */
|
||||
function pspell_new_personal(string $personal, string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN, $mode = 0) {}
|
||||
|
||||
/** @return int|false */
|
||||
function pspell_new_config(int $config) {}
|
||||
|
||||
function pspell_check(int $pspell, string $word): bool {}
|
||||
|
||||
/** @return array|false */
|
||||
function pspell_suggest(int $pspell, string $word) {}
|
||||
|
||||
function pspell_store_replacement(int $pspell, string $misspell, string $correct): bool {}
|
||||
|
||||
function pspell_add_to_personal(int $pspell, string $word): bool {}
|
||||
|
||||
function pspell_add_to_session(int $pspell, string $word): bool {}
|
||||
|
||||
function pspell_clear_session(int $pspell): bool {}
|
||||
|
||||
function pspell_save_wordlist(int $pspell): bool {}
|
||||
|
||||
function pspell_config_create(string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN): int {}
|
||||
|
||||
function pspell_config_runtogether(int $conf, bool $runtogether): bool {}
|
||||
|
||||
function pspell_config_mode(int $conf, int $mode): bool {}
|
||||
|
||||
function pspell_config_ignore(int $conf, int $ignore): bool {}
|
||||
|
||||
function pspell_config_personal(int $conf, string $personal): bool {}
|
||||
|
||||
function pspell_config_dict_dir(int $conf, string $directory): bool {}
|
||||
|
||||
function pspell_config_data_dir(int $conf, string $directory): bool {}
|
||||
|
||||
function pspell_config_repl(int $conf, string $repl): bool {}
|
||||
|
||||
function pspell_config_save_repl(int $conf, bool $save): bool {}
|
92
ext/pspell/pspell_arginfo.h
Normal file
92
ext/pspell/pspell_arginfo.h
Normal file
@ -0,0 +1,92 @@
|
||||
/* This is a generated file, edit the .stub.php file instead. */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, spelling, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, jargon, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new_personal, 0, 0, 2)
|
||||
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, spelling, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, jargon, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
|
||||
ZEND_ARG_INFO(0, mode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new_config, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_check, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_suggest, 0, 0, 2)
|
||||
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_store_replacement, 0, 3, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, misspell, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, correct, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_pspell_add_to_personal arginfo_pspell_check
|
||||
|
||||
#define arginfo_pspell_add_to_session arginfo_pspell_check
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_clear_session, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_pspell_save_wordlist arginfo_pspell_clear_session
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_create, 0, 1, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, spelling, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, jargon, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_runtogether, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, runtogether, _IS_BOOL, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_mode, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_ignore, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, ignore, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_personal, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_dict_dir, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_pspell_config_data_dir arginfo_pspell_config_dict_dir
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_repl, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, repl, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_save_repl, 0, 2, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, save, _IS_BOOL, 0)
|
||||
ZEND_END_ARG_INFO()
|
Loading…
Reference in New Issue
Block a user