mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Declare ext/pspell constants in stubs (#9096)
This commit is contained in:
parent
0490f082e9
commit
f72d264560
3 changed files with 32 additions and 8 deletions
|
@ -32,7 +32,6 @@
|
||||||
#include "php_pspell.h"
|
#include "php_pspell.h"
|
||||||
#include <pspell.h>
|
#include <pspell.h>
|
||||||
#include "ext/standard/info.h"
|
#include "ext/standard/info.h"
|
||||||
#include "pspell_arginfo.h"
|
|
||||||
|
|
||||||
#define PSPELL_FAST 1L
|
#define PSPELL_FAST 1L
|
||||||
#define PSPELL_NORMAL 2L
|
#define PSPELL_NORMAL 2L
|
||||||
|
@ -40,6 +39,8 @@
|
||||||
#define PSPELL_SPEED_MASK_INTERNAL 3L
|
#define PSPELL_SPEED_MASK_INTERNAL 3L
|
||||||
#define PSPELL_RUN_TOGETHER 8L
|
#define PSPELL_RUN_TOGETHER 8L
|
||||||
|
|
||||||
|
#include "pspell_arginfo.h"
|
||||||
|
|
||||||
/* Largest ignored word can be 999 characters (this seems sane enough),
|
/* Largest ignored word can be 999 characters (this seems sane enough),
|
||||||
* and it takes 3 bytes to represent that (see pspell_config_ignore)
|
* and it takes 3 bytes to represent that (see pspell_config_ignore)
|
||||||
*/
|
*/
|
||||||
|
@ -167,10 +168,7 @@ static PHP_MINIT_FUNCTION(pspell)
|
||||||
php_pspell_config_handlers.get_constructor = php_pspell_config_object_get_constructor;
|
php_pspell_config_handlers.get_constructor = php_pspell_config_object_get_constructor;
|
||||||
php_pspell_config_handlers.offset = XtOffsetOf(php_pspell_config_object, std);
|
php_pspell_config_handlers.offset = XtOffsetOf(php_pspell_config_object, std);
|
||||||
|
|
||||||
REGISTER_LONG_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_PERSISTENT | CONST_CS);
|
register_pspell_symbols(module_number);
|
||||||
REGISTER_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT | CONST_CS);
|
|
||||||
REGISTER_LONG_CONSTANT("PSPELL_BAD_SPELLERS", PSPELL_BAD_SPELLERS, CONST_PERSISTENT | CONST_CS);
|
|
||||||
REGISTER_LONG_CONSTANT("PSPELL_RUN_TOGETHER", PSPELL_RUN_TOGETHER, CONST_PERSISTENT | CONST_CS);
|
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
/** @generate-class-entries */
|
/** @generate-class-entries */
|
||||||
|
|
||||||
namespace PSpell {
|
namespace PSpell {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @strict-properties
|
* @strict-properties
|
||||||
* @not-serializable
|
* @not-serializable
|
||||||
|
@ -15,10 +14,29 @@ namespace PSpell {
|
||||||
* @not-serializable
|
* @not-serializable
|
||||||
*/
|
*/
|
||||||
final class Config {}
|
final class Config {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
* @cvalue PSPELL_FAST
|
||||||
|
*/
|
||||||
|
const PSPELL_FAST = UNKNOWN;
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
* @cvalue PSPELL_NORMAL
|
||||||
|
*/
|
||||||
|
const PSPELL_NORMAL = UNKNOWN;
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
* @cvalue PSPELL_BAD_SPELLERS
|
||||||
|
*/
|
||||||
|
const PSPELL_BAD_SPELLERS = UNKNOWN;
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
* @cvalue PSPELL_RUN_TOGETHER
|
||||||
|
*/
|
||||||
|
const PSPELL_RUN_TOGETHER = UNKNOWN;
|
||||||
|
|
||||||
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): PSpell\Dictionary|false {}
|
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): PSpell\Dictionary|false {}
|
||||||
|
|
||||||
|
|
10
ext/pspell/pspell_arginfo.h
generated
10
ext/pspell/pspell_arginfo.h
generated
|
@ -1,5 +1,5 @@
|
||||||
/* This is a generated file, edit the .stub.php file instead.
|
/* This is a generated file, edit the .stub.php file instead.
|
||||||
* Stub hash: 54253af8d28520254e062171733c753d7104ec6b */
|
* Stub hash: 8d35f61a0b48c5422b31e78f587d9258fd3e8e37 */
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, PSpell\\Dictionary, MAY_BE_FALSE)
|
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, PSpell\\Dictionary, MAY_BE_FALSE)
|
||||||
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
|
||||||
|
@ -144,6 +144,14 @@ static const zend_function_entry class_PSpell_Config_methods[] = {
|
||||||
ZEND_FE_END
|
ZEND_FE_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void register_pspell_symbols(int module_number)
|
||||||
|
{
|
||||||
|
REGISTER_LONG_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_CS | CONST_PERSISTENT);
|
||||||
|
REGISTER_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_CS | CONST_PERSISTENT);
|
||||||
|
REGISTER_LONG_CONSTANT("PSPELL_BAD_SPELLERS", PSPELL_BAD_SPELLERS, CONST_CS | CONST_PERSISTENT);
|
||||||
|
REGISTER_LONG_CONSTANT("PSPELL_RUN_TOGETHER", PSPELL_RUN_TOGETHER, CONST_CS | CONST_PERSISTENT);
|
||||||
|
}
|
||||||
|
|
||||||
static zend_class_entry *register_class_PSpell_Dictionary(void)
|
static zend_class_entry *register_class_PSpell_Dictionary(void)
|
||||||
{
|
{
|
||||||
zend_class_entry ce, *class_entry;
|
zend_class_entry ce, *class_entry;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue