Skip to content

Commit 8fee9a3

Browse files
authored
Declare ext/intl constants in stubs - part 7 (#9269)
1 parent d97f8ee commit 8fee9a3

File tree

8 files changed

+24
-59
lines changed

8 files changed

+24
-59
lines changed

ext/intl/config.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ if test "$PHP_INTL" != "no"; then
4949
resourcebundle/resourcebundle.c \
5050
resourcebundle/resourcebundle_class.c \
5151
resourcebundle/resourcebundle_iterator.c \
52-
transliterator/transliterator.c \
5352
transliterator/transliterator_class.c \
5453
transliterator/transliterator_methods.c \
5554
uchar/uchar.c \

ext/intl/config.w32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ if (PHP_INTL != "no") {
9191
}
9292

9393
ADD_SOURCES(configure_module_dirname + "/transliterator", "\
94-
transliterator.c \
9594
transliterator_class.c \
9695
transliterator_methods.c",
9796
"intl");

ext/intl/php_intl.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ PHP_MINIT_FUNCTION( intl )
176176
/* Register 'Transliterator' PHP class */
177177
transliterator_register_Transliterator_class( );
178178

179-
/* Register Transliterator constants */
180-
transliterator_register_constants( INIT_FUNC_ARGS_PASSTHRU );
181-
182179
/* Register 'IntlTimeZone' PHP class */
183180
timezone_register_IntlTimeZone_class( );
184181

ext/intl/transliterator/transliterator.c

Lines changed: 0 additions & 48 deletions
This file was deleted.

ext/intl/transliterator/transliterator.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
#define TRANSLITERATOR_TRANSLITERATOR_H
1717

1818
#include <php.h>
19-
#include <unicode/utypes.h>
2019
#include <unicode/utrans.h>
2120

2221
#include "zend_smart_str.h"
2322

24-
void transliterator_register_constants( INIT_FUNC_ARGS );
2523
smart_str transliterator_parse_error_to_string( UParseError* pe );
2624

2725
#endif /* #ifndef TRANSLITERATOR_TRANSLITERATOR_H */

ext/intl/transliterator/transliterator.stub.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
/** @not-serializable */
66
class Transliterator
77
{
8+
/**
9+
* @var int
10+
* @cvalue TRANSLITERATOR_FORWARD
11+
*/
12+
public const FORWARD = UNKNOWN;
13+
/**
14+
* @var int
15+
* @cvalue TRANSLITERATOR_REVERSE
16+
*/
17+
public const REVERSE = UNKNOWN;
18+
819
public readonly string $id;
920

1021
final private function __construct() {}

ext/intl/transliterator/transliterator_arginfo.h

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/intl/transliterator/transliterator_class.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,5 @@ void transliterator_register_Transliterator_class( void )
188188
Transliterator_handlers.offset = XtOffsetOf(Transliterator_object, zo);
189189
Transliterator_handlers.free_obj = Transliterator_objects_free;
190190
Transliterator_handlers.clone_obj = Transliterator_clone_obj;
191-
192-
/* constants are declared in transliterator_register_constants, called from MINIT */
193-
194191
}
195192
/* }}} */

0 commit comments

Comments
 (0)