mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Declare ext/enchant constants in stubs (#8679)
This commit is contained in:
parent
e7817ec3b2
commit
8d79e665f1
@ -26,6 +26,13 @@
|
||||
#include "../spl/spl_exceptions.h"
|
||||
#include <enchant.h>
|
||||
#include "php_enchant.h"
|
||||
|
||||
#define PHP_ENCHANT_MYSPELL 1
|
||||
#define PHP_ENCHANT_ISPELL 2
|
||||
#ifdef HAVE_ENCHANT_GET_VERSION
|
||||
#define PHP_ENCHANT_GET_VERSION enchant_get_version()
|
||||
#endif
|
||||
|
||||
#include "enchant_arginfo.h"
|
||||
|
||||
typedef struct _broker_struct {
|
||||
@ -78,9 +85,6 @@ static zend_object *enchant_dict_create_object(zend_class_entry *class_type) {
|
||||
return &intern->std;
|
||||
}
|
||||
|
||||
#define PHP_ENCHANT_MYSPELL 1
|
||||
#define PHP_ENCHANT_ISPELL 2
|
||||
|
||||
/* {{{ enchant_module_entry */
|
||||
zend_module_entry enchant_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
@ -203,11 +207,8 @@ PHP_MINIT_FUNCTION(enchant)
|
||||
enchant_dict_handlers.clone_obj = NULL;
|
||||
enchant_dict_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
REGISTER_LONG_CONSTANT("ENCHANT_MYSPELL", PHP_ENCHANT_MYSPELL, CONST_CS | CONST_PERSISTENT | CONST_DEPRECATED);
|
||||
REGISTER_LONG_CONSTANT("ENCHANT_ISPELL", PHP_ENCHANT_ISPELL, CONST_CS | CONST_PERSISTENT | CONST_DEPRECATED);
|
||||
#ifdef HAVE_ENCHANT_GET_VERSION
|
||||
REGISTER_STRING_CONSTANT("LIBENCHANT_VERSION", enchant_get_version(), CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
register_enchant_consts(module_number);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -2,6 +2,26 @@
|
||||
|
||||
/** @generate-class-entries */
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @cname PHP_ENCHANT_MYSPELL
|
||||
* @deprecated
|
||||
*/
|
||||
const ENCHANT_MYSPELL = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cname PHP_ENCHANT_ISPELL
|
||||
* @deprecated
|
||||
*/
|
||||
const ENCHANT_ISPELL = UNKNOWN;
|
||||
#ifdef HAVE_ENCHANT_GET_VERSION
|
||||
/**
|
||||
* @var string
|
||||
* @cname PHP_ENCHANT_GET_VERSION
|
||||
*/
|
||||
const LIBENCHANT_VERSION = UNKNOWN;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @strict-properties
|
||||
* @not-serializable
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 751d42c599a97854a00ddae296e9b20efeee6a3e */
|
||||
* Stub hash: c41b6d66fdc5f403b95592041f44d9bb0db9b3fa */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_init, 0, 0, EnchantBroker, MAY_BE_FALSE)
|
||||
ZEND_END_ARG_INFO()
|
||||
@ -158,6 +158,15 @@ static const zend_function_entry class_EnchantDictionary_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
static void register_enchant_consts(int module_number)
|
||||
{
|
||||
REGISTER_LONG_CONSTANT("ENCHANT_MYSPELL", PHP_ENCHANT_MYSPELL, CONST_CS | CONST_PERSISTENT | CONST_DEPRECATED);
|
||||
REGISTER_LONG_CONSTANT("ENCHANT_ISPELL", PHP_ENCHANT_ISPELL, CONST_CS | CONST_PERSISTENT | CONST_DEPRECATED);
|
||||
#if defined(HAVE_ENCHANT_GET_VERSION)
|
||||
REGISTER_STRING_CONSTANT("LIBENCHANT_VERSION", PHP_ENCHANT_GET_VERSION, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
}
|
||||
|
||||
static zend_class_entry *register_class_EnchantBroker(void)
|
||||
{
|
||||
zend_class_entry ce, *class_entry;
|
||||
|
Loading…
Reference in New Issue
Block a user