Generate ext/intl class entries from stubs

Closes GH-6670
This commit is contained in:
Máté Kocsis 2021-02-05 20:57:57 +01:00
parent 99b08ac281
commit c6723728df
No known key found for this signature in database
GPG key ID: FD055E41728BF310
44 changed files with 276 additions and 157 deletions

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class IntlBreakIterator implements IteratorAggregate
{
@ -86,12 +86,6 @@ class IntlRuleBasedBreakIterator extends IntlBreakIterator
public function getRuleStatusVec() {}
}
class IntlPartsIterator extends IntlIterator
{
/** @return IntlBreakIterator */
public function getBreakIterator() {}
}
class IntlCodePointBreakIterator extends IntlBreakIterator
{
/** @return int */

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 6a121ed9817667820f05677a772781d6b788796b */
* Stub hash: 9e9dc1cd1302038f351f6075393494d1a58f0d74 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_createCharacterInstance, 0, 0, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null")
@ -72,8 +72,6 @@ ZEND_END_ARG_INFO()
#define arginfo_class_IntlRuleBasedBreakIterator_getRuleStatusVec arginfo_class_IntlBreakIterator_createCodePointInstance
#define arginfo_class_IntlPartsIterator_getBreakIterator arginfo_class_IntlBreakIterator_createCodePointInstance
#define arginfo_class_IntlCodePointBreakIterator_getLastCodePoint arginfo_class_IntlBreakIterator_createCodePointInstance
@ -104,7 +102,6 @@ ZEND_METHOD(IntlRuleBasedBreakIterator, getBinaryRules);
ZEND_METHOD(IntlRuleBasedBreakIterator, getRules);
ZEND_METHOD(IntlRuleBasedBreakIterator, getRuleStatus);
ZEND_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec);
ZEND_METHOD(IntlPartsIterator, getBreakIterator);
ZEND_METHOD(IntlCodePointBreakIterator, getLastCodePoint);
@ -145,13 +142,39 @@ static const zend_function_entry class_IntlRuleBasedBreakIterator_methods[] = {
};
static const zend_function_entry class_IntlPartsIterator_methods[] = {
ZEND_ME(IntlPartsIterator, getBreakIterator, arginfo_class_IntlPartsIterator_getBreakIterator, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
static const zend_function_entry class_IntlCodePointBreakIterator_methods[] = {
ZEND_ME(IntlCodePointBreakIterator, getLastCodePoint, arginfo_class_IntlCodePointBreakIterator_getLastCodePoint, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_IntlBreakIterator(zend_class_entry *class_entry_IteratorAggregate)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlBreakIterator", class_IntlBreakIterator_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
zend_class_implements(class_entry, 1, class_entry_IteratorAggregate);
return class_entry;
}
zend_class_entry *register_class_IntlRuleBasedBreakIterator(zend_class_entry *class_entry_IntlBreakIterator)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlRuleBasedBreakIterator", class_IntlRuleBasedBreakIterator_methods);
class_entry = zend_register_internal_class_ex(&ce, class_entry_IntlBreakIterator);
return class_entry;
}
zend_class_entry *register_class_IntlCodePointBreakIterator(zend_class_entry *class_entry_IntlBreakIterator)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlCodePointBreakIterator", class_IntlCodePointBreakIterator_methods);
class_entry = zend_register_internal_class_ex(&ce, class_entry_IntlBreakIterator);
return class_entry;
}

View file

@ -220,13 +220,11 @@ static zend_object *BreakIterator_object_create(zend_class_entry *ce)
*/
U_CFUNC void breakiterator_register_BreakIterator_class(void)
{
zend_class_entry ce;
/* Create and register 'BreakIterator' class. */
INIT_CLASS_ENTRY(ce, "IntlBreakIterator", class_IntlBreakIterator_methods);
ce.create_object = BreakIterator_object_create;
ce.get_iterator = _breakiterator_get_iterator;
BreakIterator_ce_ptr = zend_register_internal_class(&ce);
BreakIterator_ce_ptr = register_class_IntlBreakIterator(zend_ce_aggregate);
BreakIterator_ce_ptr->create_object = BreakIterator_object_create;
BreakIterator_ce_ptr->get_iterator = _breakiterator_get_iterator;
memcpy(&BreakIterator_handlers, &std_object_handlers,
sizeof BreakIterator_handlers);
@ -236,8 +234,6 @@ U_CFUNC void breakiterator_register_BreakIterator_class(void)
BreakIterator_handlers.get_debug_info = BreakIterator_get_debug_info;
BreakIterator_handlers.free_obj = BreakIterator_objects_free;
zend_class_implements(BreakIterator_ce_ptr, 1, zend_ce_aggregate);
zend_declare_class_constant_long(BreakIterator_ce_ptr,
"DONE", sizeof("DONE") - 1, BreakIterator::DONE );
@ -271,15 +267,9 @@ U_CFUNC void breakiterator_register_BreakIterator_class(void)
/* Create and register 'RuleBasedBreakIterator' class. */
INIT_CLASS_ENTRY(ce, "IntlRuleBasedBreakIterator",
class_IntlRuleBasedBreakIterator_methods);
RuleBasedBreakIterator_ce_ptr = zend_register_internal_class_ex(&ce,
BreakIterator_ce_ptr);
RuleBasedBreakIterator_ce_ptr = register_class_IntlRuleBasedBreakIterator(BreakIterator_ce_ptr);
/* Create and register 'CodePointBreakIterator' class. */
INIT_CLASS_ENTRY(ce, "IntlCodePointBreakIterator",
class_IntlCodePointBreakIterator_methods);
CodePointBreakIterator_ce_ptr = zend_register_internal_class_ex(&ce,
BreakIterator_ce_ptr);
CodePointBreakIterator_ce_ptr = register_class_IntlCodePointBreakIterator(BreakIterator_ce_ptr);
}
/* }}} */

View file

@ -24,7 +24,7 @@
extern "C" {
#define USE_BREAKITERATOR_POINTER
#include "breakiterator_class.h"
#include "breakiterator_arginfo.h"
#include "breakiterator_iterators_arginfo.h"
#include "../intl_convert.h"
#include "../locale/locale.h"
#include <zend_exceptions.h>
@ -287,12 +287,8 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator)
U_CFUNC void breakiterator_register_IntlPartsIterator_class(void)
{
zend_class_entry ce;
/* Create and register 'BreakIterator' class. */
INIT_CLASS_ENTRY(ce, "IntlPartsIterator", class_IntlPartsIterator_methods);
IntlPartsIterator_ce_ptr = zend_register_internal_class_ex(&ce,
IntlIterator_ce_ptr);
IntlPartsIterator_ce_ptr = register_class_IntlPartsIterator(IntlIterator_ce_ptr);
IntlPartsIterator_ce_ptr->create_object = IntlPartsIterator_object_create;
memcpy(&IntlPartsIterator_handlers, &IntlIterator_handlers,

View file

@ -0,0 +1,9 @@
<?php
/** @generate-class-entries */
class IntlPartsIterator extends IntlIterator
{
/** @return IntlBreakIterator */
public function getBreakIterator() {}
}

View file

@ -0,0 +1,25 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 5e165fe25d6d13824da9d7c5f0a089ee11626689 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlPartsIterator_getBreakIterator, 0, 0, 0)
ZEND_END_ARG_INFO()
ZEND_METHOD(IntlPartsIterator, getBreakIterator);
static const zend_function_entry class_IntlPartsIterator_methods[] = {
ZEND_ME(IntlPartsIterator, getBreakIterator, arginfo_class_IntlPartsIterator_getBreakIterator, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_IntlPartsIterator(zend_class_entry *class_entry_IntlIterator)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlPartsIterator", class_IntlPartsIterator_methods);
class_entry = zend_register_internal_class_ex(&ce, class_entry_IntlIterator);
return class_entry;
}

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class IntlCalendar
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 18a92d3af801f11e5c3b90e5d272fd98b3515c40 */
* Stub hash: a0800bd27fe214cce7420e689e9d7b519a7b6835 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
@ -270,3 +270,24 @@ static const zend_function_entry class_IntlGregorianCalendar_methods[] = {
ZEND_ME_MAPPING(isLeapYear, intlgregcal_is_leap_year, arginfo_class_IntlGregorianCalendar_isLeapYear, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_IntlCalendar()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlCalendar", class_IntlCalendar_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}
zend_class_entry *register_class_IntlGregorianCalendar(zend_class_entry *class_entry_IntlCalendar)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", class_IntlGregorianCalendar_methods);
class_entry = zend_register_internal_class_ex(&ce, class_entry_IntlCalendar);
return class_entry;
}

View file

@ -268,12 +268,9 @@ static zend_object *Calendar_object_create(zend_class_entry *ce)
*/
void calendar_register_IntlCalendar_class(void)
{
zend_class_entry ce;
/* Create and register 'IntlCalendar' class. */
INIT_CLASS_ENTRY(ce, "IntlCalendar", class_IntlCalendar_methods);
ce.create_object = Calendar_object_create;
Calendar_ce_ptr = zend_register_internal_class(&ce);
Calendar_ce_ptr = register_class_IntlCalendar();
Calendar_ce_ptr->create_object = Calendar_object_create;
memcpy( &Calendar_handlers, &std_object_handlers,
sizeof Calendar_handlers);
@ -331,8 +328,6 @@ void calendar_register_IntlCalendar_class(void)
CALENDAR_DECL_LONG_CONST("WALLTIME_NEXT_VALID", UCAL_WALLTIME_NEXT_VALID);
/* Create and register 'IntlGregorianCalendar' class. */
INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", class_IntlGregorianCalendar_methods);
GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce,
Calendar_ce_ptr);
GregorianCalendar_ce_ptr = register_class_IntlGregorianCalendar(Calendar_ce_ptr);
}
/* }}} */

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class Collator
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 869c6e60a8f2b153ef79f28a08e165ff3ec2bc14 */
* Stub hash: 9907156bf1d28af7bf6a1858dffc58994c12756f */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
@ -85,3 +85,14 @@ static const zend_function_entry class_Collator_methods[] = {
ZEND_ME_MAPPING(getSortKey, collator_get_sort_key, arginfo_class_Collator_getSortKey, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_Collator()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "Collator", class_Collator_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -63,12 +63,9 @@ zend_object *Collator_object_create(zend_class_entry *ce )
*/
void collator_register_Collator_class( void )
{
zend_class_entry ce;
/* Create and register 'Collator' class. */
INIT_CLASS_ENTRY( ce, "Collator", class_Collator_methods );
ce.create_object = Collator_object_create;
Collator_ce_ptr = zend_register_internal_class( &ce );
Collator_ce_ptr = register_class_Collator();
Collator_ce_ptr->create_object = Collator_object_create;
memcpy(&Collator_handlers, &std_object_handlers,
sizeof Collator_handlers);

View file

@ -966,10 +966,7 @@ static zend_object *php_converter_clone_object(zend_object *object) {
/* {{{ php_converter_minit */
int php_converter_minit(INIT_FUNC_ARGS) {
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "UConverter", class_UConverter_methods);
php_converter_ce = zend_register_internal_class(&ce);
php_converter_ce = register_class_UConverter();
php_converter_ce->create_object = php_converter_create_object;
memcpy(&php_converter_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
php_converter_object_handlers.offset = XtOffsetOf(php_converter_object, obj);

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class UConverter
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: e33e2614c969c59b79c6062f7a347a8e8e486d85 */
* Stub hash: c01b6c9d6a6754a2fffde1279bec3a984e6a2f34 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_UConverter___construct, 0, 0, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, destination_encoding, IS_STRING, 1, "null")
@ -113,3 +113,14 @@ static const zend_function_entry class_UConverter_methods[] = {
ZEND_ME(UConverter, transcode, arginfo_class_UConverter_transcode, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_FE_END
};
zend_class_entry *register_class_UConverter()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "UConverter", class_UConverter_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class IntlDateFormatter
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 62742b5f463272f43970e98900a89d513c4fb839 */
* Stub hash: 4f93c3fca18c225b26dec1e970b783baa4622425 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
@ -125,3 +125,14 @@ static const zend_function_entry class_IntlDateFormatter_methods[] = {
ZEND_ME_MAPPING(getErrorMessage, datefmt_get_error_message, arginfo_class_IntlDateFormatter_getErrorMessage, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_IntlDateFormatter()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlDateFormatter", class_IntlDateFormatter_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -107,12 +107,9 @@ zend_object *IntlDateFormatter_object_clone(zend_object *object)
*/
void dateformat_register_IntlDateFormatter_class( void )
{
zend_class_entry ce;
/* Create and register 'IntlDateFormatter' class. */
INIT_CLASS_ENTRY( ce, "IntlDateFormatter", class_IntlDateFormatter_methods );
ce.create_object = IntlDateFormatter_object_create;
IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce );
IntlDateFormatter_ce_ptr = register_class_IntlDateFormatter();
IntlDateFormatter_ce_ptr->create_object = IntlDateFormatter_object_create;
memcpy(&IntlDateFormatter_handlers, &std_object_handlers,
sizeof IntlDateFormatter_handlers);

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class NumberFormatter
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 0f285bbaa6f4f37060eb8325956f41bd86e9dea3 */
* Stub hash: 2a232c97981e23bec14f03e564a7ec3d7fedc31e */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter___construct, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
@ -111,3 +111,14 @@ static const zend_function_entry class_NumberFormatter_methods[] = {
ZEND_ME_MAPPING(getErrorMessage, numfmt_get_error_message, arginfo_class_NumberFormatter_getErrorMessage, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_NumberFormatter()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "NumberFormatter", class_NumberFormatter_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -94,12 +94,9 @@ zend_object *NumberFormatter_object_clone(zend_object *object)
*/
void formatter_register_class( void )
{
zend_class_entry ce;
/* Create and register 'NumberFormatter' class. */
INIT_CLASS_ENTRY( ce, "NumberFormatter", class_NumberFormatter_methods );
ce.create_object = NumberFormatter_object_create;
NumberFormatter_ce_ptr = zend_register_internal_class( &ce );
NumberFormatter_ce_ptr = register_class_NumberFormatter();
NumberFormatter_ce_ptr->create_object = NumberFormatter_object_create;
NumberFormatter_ce_ptr->serialize = zend_class_serialize_deny;
NumberFormatter_ce_ptr->unserialize = zend_class_unserialize_deny;

View file

@ -203,17 +203,6 @@ void intl_errors_set_code( intl_error* err, UErrorCode err_code )
}
/* }}} */
void intl_register_IntlException_class( void )
{
zend_class_entry ce;
/* Create and register 'IntlException' class. */
INIT_CLASS_ENTRY_EX( ce, "IntlException", sizeof( "IntlException" ) - 1, NULL );
IntlException_ce_ptr = zend_register_internal_class_ex( &ce,
zend_ce_exception );
IntlException_ce_ptr->create_object = zend_ce_exception->create_object;
}
smart_str intl_parse_error_to_string( UParseError* pe )
{
smart_str ret = {0};

View file

@ -47,7 +47,4 @@ void intl_errors_set( intl_error* err, UErrorCode code, const char* msg,
// Other error helpers
smart_str intl_parse_error_to_string( UParseError* pe );
// exported to be called on extension MINIT
void intl_register_IntlException_class( void );
#endif // INTL_ERROR_H

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class Locale
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 4135dc9df49d3fe20275d49bad428a2e3e0a8752 */
* Stub hash: 6b873a68045fb5cf75e23991a3c77aa01a8893ee */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Locale_getDefault, 0, 0, 0)
ZEND_END_ARG_INFO()
@ -98,3 +98,14 @@ static const zend_function_entry class_Locale_methods[] = {
ZEND_ME_MAPPING(acceptFromHttp, locale_accept_from_http, arginfo_class_Locale_acceptFromHttp, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_FE_END
};
zend_class_entry *register_class_Locale()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "Locale", class_Locale_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -30,19 +30,8 @@ zend_class_entry *Locale_ce_ptr = NULL;
*/
void locale_register_Locale_class( void )
{
zend_class_entry ce;
/* Create and register 'Locale' class. */
INIT_CLASS_ENTRY( ce, "Locale", class_Locale_methods );
ce.create_object = NULL;
Locale_ce_ptr = zend_register_internal_class( &ce );
/* Declare 'Locale' class properties. */
if( !Locale_ce_ptr )
{
zend_error( E_ERROR,
"Locale: Failed to register Locale class.");
return;
}
Locale_ce_ptr = register_class_Locale();
Locale_ce_ptr->create_object = NULL;
}
/* }}} */

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class MessageFormatter
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: ece8c5157dc3a62ca2951d058b3c5497bb5cb836 */
* Stub hash: 0d5b34913965434a4015e2b6ac7288edbbafc3f3 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter___construct, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
@ -69,3 +69,14 @@ static const zend_function_entry class_MessageFormatter_methods[] = {
ZEND_ME_MAPPING(getErrorMessage, msgfmt_get_error_message, arginfo_class_MessageFormatter_getErrorMessage, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_MessageFormatter()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "MessageFormatter", class_MessageFormatter_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -93,12 +93,9 @@ zend_object *MessageFormatter_object_clone(zend_object *object)
*/
void msgformat_register_class( void )
{
zend_class_entry ce;
/* Create and register 'MessageFormatter' class. */
INIT_CLASS_ENTRY( ce, "MessageFormatter", class_MessageFormatter_methods );
ce.create_object = MessageFormatter_object_create;
MessageFormatter_ce_ptr = zend_register_internal_class( &ce );
MessageFormatter_ce_ptr = register_class_MessageFormatter();
MessageFormatter_ce_ptr->create_object = MessageFormatter_object_create;
memcpy(&MessageFormatter_handlers, &std_object_handlers,
sizeof MessageFormatter_handlers);

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class Normalizer
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 3b9ef4888cc32bd009fb87db52859953902454fc */
* Stub hash: 651065249a99f9ee50126d58223b8f4527e3fc09 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Normalizer_normalize, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@ -31,3 +31,14 @@ static const zend_function_entry class_Normalizer_methods[] = {
#endif
ZEND_FE_END
};
zend_class_entry *register_class_Normalizer()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "Normalizer", class_Normalizer_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -30,20 +30,8 @@ zend_class_entry *Normalizer_ce_ptr = NULL;
*/
void normalizer_register_Normalizer_class( void )
{
zend_class_entry ce;
/* Create and register 'Normalizer' class. */
INIT_CLASS_ENTRY( ce, "Normalizer", class_Normalizer_methods );
ce.create_object = NULL;
Normalizer_ce_ptr = zend_register_internal_class( &ce );
/* Declare 'Normalizer' class properties. */
if( !Normalizer_ce_ptr )
{
zend_error( E_ERROR,
"Normalizer: attempt to create properties "
"on a non-registered class." );
return;
}
Normalizer_ce_ptr = register_class_Normalizer();
Normalizer_ce_ptr->create_object = NULL;
}
/* }}} */

View file

@ -215,7 +215,8 @@ PHP_MINIT_FUNCTION( intl )
spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU );
/* Register 'IntlException' PHP class */
intl_register_IntlException_class( );
IntlException_ce_ptr = register_class_IntlException(zend_ce_exception);
IntlException_ce_ptr->create_object = zend_ce_exception->create_object;
/* Register 'IntlIterator' PHP class */
intl_register_IntlIterator_class( );

View file

@ -1,6 +1,10 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class IntlException extends Exception
{
}
/* calendar */

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: c890e3cde79ffeade4623001cc369aa734812959 */
* Stub hash: 9ddf3e4e42735c34a8b53a1856d6dc93346afc6f */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1)
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
@ -1165,3 +1165,19 @@ static const zend_function_entry ext_functions[] = {
ZEND_FE(transliterator_get_error_message, arginfo_transliterator_get_error_message)
ZEND_FE_END
};
static const zend_function_entry class_IntlException_methods[] = {
ZEND_FE_END
};
zend_class_entry *register_class_IntlException(zend_class_entry *class_entry_Exception)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlException", class_IntlException_methods);
class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception);
return class_entry;
}

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class Spoofchecker
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 10c330c8e06dbe21833f9c556b005fde2ea0ab42 */
* Stub hash: b0317673c829b873b95aac34d362cd5ad004aca9 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
@ -51,3 +51,14 @@ static const zend_function_entry class_Spoofchecker_methods[] = {
#endif
ZEND_FE_END
};
zend_class_entry *register_class_Spoofchecker()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "Spoofchecker", class_Spoofchecker_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -90,12 +90,9 @@ static zend_object *spoofchecker_clone_obj(zend_object *object) /* {{{ */
*/
void spoofchecker_register_Spoofchecker_class(void)
{
zend_class_entry ce;
/* Create and register 'Spoofchecker' class. */
INIT_CLASS_ENTRY(ce, "Spoofchecker", class_Spoofchecker_methods);
ce.create_object = Spoofchecker_object_create;
Spoofchecker_ce_ptr = zend_register_internal_class(&ce);
Spoofchecker_ce_ptr = register_class_Spoofchecker();
Spoofchecker_ce_ptr->create_object = Spoofchecker_object_create;
memcpy(&Spoofchecker_handlers, &std_object_handlers,
sizeof Spoofchecker_handlers);

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class IntlTimeZone
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: afd0e74b29d54cde9789787b924af9b43539a7f4 */
* Stub hash: 02045a0de09413796dd1ca7495b0b1beff14a074 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlTimeZone___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
@ -152,3 +152,14 @@ static const zend_function_entry class_IntlTimeZone_methods[] = {
ZEND_ME_MAPPING(useDaylightTime, intltz_use_daylight_time, arginfo_class_IntlTimeZone_useDaylightTime, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_IntlTimeZone()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlTimeZone", class_IntlTimeZone_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -396,18 +396,9 @@ static zend_object *TimeZone_object_create(zend_class_entry *ce)
*/
U_CFUNC void timezone_register_IntlTimeZone_class(void)
{
zend_class_entry ce;
/* Create and register 'IntlTimeZone' class. */
INIT_CLASS_ENTRY(ce, "IntlTimeZone", class_IntlTimeZone_methods);
ce.create_object = TimeZone_object_create;
TimeZone_ce_ptr = zend_register_internal_class(&ce);
if (!TimeZone_ce_ptr) {
//can't happen now without bigger problems before
php_error_docref(NULL, E_ERROR,
"IntlTimeZone: class registration has failed.");
return;
}
TimeZone_ce_ptr = register_class_IntlTimeZone();
TimeZone_ce_ptr->create_object = TimeZone_object_create;
memcpy(&TimeZone_handlers, &std_object_handlers,
sizeof TimeZone_handlers);

View file

@ -612,10 +612,9 @@ IC_CHAR_METHOD_CHAR(getBidiPairedBracket)
/* }}} */
int php_uchar_minit(INIT_FUNC_ARGS) {
zend_class_entry tmp, *ce;
zend_class_entry *ce;
INIT_CLASS_ENTRY(tmp, "IntlChar", class_IntlChar_methods);
ce = zend_register_internal_class(&tmp);
ce = register_class_IntlChar();
#define IC_CONSTL(name, val) \
zend_declare_class_constant_long(ce, name, strlen(name), val);

View file

@ -1,6 +1,6 @@
<?php
/** @generate-function-entries */
/** @generate-class-entries */
class IntlChar
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 05ea5d884642e75721f90728fb24b7ad5ce46897 */
* Stub hash: 65836ce6bd16316bb022bc75ce5e2fbbdd1880b7 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_hasBinaryProperty, 0, 0, 2)
ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL)
@ -295,3 +295,14 @@ static const zend_function_entry class_IntlChar_methods[] = {
ZEND_ME(IntlChar, toupper, arginfo_class_IntlChar_toupper, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_FE_END
};
zend_class_entry *register_class_IntlChar()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IntlChar", class_IntlChar_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}