|
1 | 1 | #include "uchar.h"
|
2 | 2 | #include "intl_data.h"
|
3 | 3 | #include "intl_convert.h"
|
4 |
| -#include "uchar_arginfo.h" |
5 | 4 |
|
6 | 5 | #include <unicode/uchar.h>
|
7 | 6 | #include <unicode/utf8.h>
|
8 | 7 |
|
| 8 | +#include "uchar_arginfo.h" |
| 9 | + |
9 | 10 | #define IC_METHOD(mname) PHP_METHOD(IntlChar, mname)
|
10 | 11 |
|
11 | 12 | static inline int convert_cp(UChar32* pcp, zend_string *string_codepoint, zend_long int_codepoint) {
|
@@ -612,45 +613,7 @@ IC_CHAR_METHOD_CHAR(getBidiPairedBracket)
|
612 | 613 | /* }}} */
|
613 | 614 |
|
614 | 615 | int php_uchar_minit(INIT_FUNC_ARGS) {
|
615 |
| - zend_class_entry *ce; |
616 |
| - |
617 |
| - ce = register_class_IntlChar(); |
618 |
| - |
619 |
| -#define IC_CONSTL(name, val) \ |
620 |
| - zend_declare_class_constant_long(ce, name, strlen(name), val); |
621 |
| - |
622 |
| - zend_declare_class_constant_string(ce, "UNICODE_VERSION", sizeof("UNICODE_VERISON")-1, U_UNICODE_VERSION); |
623 |
| - IC_CONSTL("CODEPOINT_MIN", UCHAR_MIN_VALUE) |
624 |
| - IC_CONSTL("CODEPOINT_MAX", UCHAR_MAX_VALUE) |
625 |
| - zend_declare_class_constant_double(ce, "NO_NUMERIC_VALUE", sizeof("NO_NUMERIC_VALUE")-1, U_NO_NUMERIC_VALUE); |
626 |
| - |
627 |
| - /* All enums used by the uchar APIs. There are a LOT of them, |
628 |
| - * so they're separated out into include files, |
629 |
| - * leaving this source file for actual implementation. |
630 |
| - */ |
631 |
| -#define UPROPERTY(name) IC_CONSTL("PROPERTY_" #name, UCHAR_##name) |
632 |
| -#include "uproperty-enum.h" |
633 |
| -#undef UPROPERTY |
634 |
| - |
635 |
| -#define UCHARCATEGORY(name) IC_CONSTL("CHAR_CATEGORY_" #name, U_##name) |
636 |
| -#include "ucharcategory-enum.h" |
637 |
| -#undef UCHARCATEGORY |
638 |
| - |
639 |
| -#define UCHARDIRECTION(name) IC_CONSTL("CHAR_DIRECTION_" #name, U_##name) |
640 |
| -#include "uchardirection-enum.h" |
641 |
| -#undef UCHARDIRECTION |
642 |
| - |
643 |
| -#define UBLOCKCODE(name) IC_CONSTL("BLOCK_CODE_" #name, UBLOCK_##name) |
644 |
| -#include "ublockcode-enum.h" |
645 |
| -#undef UBLOCKCODE |
646 |
| - |
647 |
| - /* Smaller, self-destribing enums */ |
648 |
| -#define UOTHER(name) IC_CONSTL(#name, U_##name) |
649 |
| -#include "uother-enum.h" |
650 |
| -#undef UOTHER |
651 |
| - |
652 |
| -#undef IC_CONSTL |
653 |
| -#undef IC_CONSTS |
| 616 | + register_class_IntlChar(); |
654 | 617 |
|
655 | 618 | return SUCCESS;
|
656 | 619 | }
|
0 commit comments