Skip to content

Commit df950ad

Browse files
committed
split MINIT for Locale
1 parent 96f7110 commit df950ad

File tree

8 files changed

+654
-627
lines changed

8 files changed

+654
-627
lines changed

package.xml

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Fix: remove package.xml from manifest to avoid md5 checksum errors when installi
8181
<file name="intl.h" role="src"/>
8282
<file name="locale.c" role="src"/>
8383
<file name="locale.h" role="src"/>
84+
<file name="locale_arginfo.h" role="src"/>
85+
<file name="locale.stub.php" role="src"/>
8486
<file name="locale_character_direction.c" role="src"/>
8587
<file name="locale_character_direction.h" role="src"/>
8688
<file name="locale_character_direction_arginfo.h" role="src"/>

src/php/classes/locale.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include "php/classes/locale_week_day.h"
2727
#include "php/classes/locale_week_info.h"
2828

29+
#include "php/classes/locale_arginfo.h"
30+
2931
#include <Zend/zend_interfaces.h>
3032
#include <ext/json/php_json.h>
3133
#include <string.h>
@@ -80,7 +82,7 @@ static void setWeekInfo(zend_object *object, ecma402_locale *locale);
8082
static UCalendarDaysOfWeek weekDayEcmaToIcu(ecma402_dayOfWeek day);
8183
static ecma402_dayOfWeek weekDayIcuToEcma(UCalendarDaysOfWeek day);
8284

83-
void registerEcmaIntlLocale() {
85+
PHP_MINIT_FUNCTION(ecma_intl_locale) {
8486
ecma_ce_IntlLocale = register_class_Ecma_Intl_Locale(php_json_serializable_ce,
8587
zend_ce_stringable);
8688
ecma_ce_IntlLocale->create_object = ecma_createIntlLocale;

src/php/classes/locale.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ static inline ecma_IntlLocale *ecma_IntlLocaleFromObj(zend_object *obj) {
3131
extern zend_class_entry *ecma_ce_IntlLocale;
3232
extern zend_object_handlers ecma_handlers_IntlLocale;
3333

34-
void registerEcmaIntlLocale(void);
3534
zend_object *ecma_createIntlLocale(zend_class_entry *classEntry);
3635

36+
PHP_MINIT_FUNCTION(ecma_intl_locale);
37+
3738
#endif /* ECMA_INTL_PHP_CLASSES_LOCALE_H */

0 commit comments

Comments
 (0)