mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Update gen_stubs.php to generate C enums from internal enums, when the stub is annotated with @generate-c-enums. Enum values can be compared to the result of zend_enum_fetch_case_id(zend_object*).
The generated enums are added to separate files named {$extensionName}_decl.h, so that it's possible to include these from anywhere. _arginfo.h files would generate warnings if we tried to include them in a compilation unit that doesn't call the register_{$class} functions, for instance.
Introduce Z_PARAM_ENUM().
* Make ZEND_AST_CONST_ENUM_INIT a 4-children node
* Store enum case id in ZEND_AST_CONST_ENUM_INIT
* Store enum case id in instance
* Expose enum case_id internally
* Generate C enum for internal enums
* Introduce Z_PARAM_ENUM()
* Port extensions
15 lines
619 B
C
Generated
15 lines
619 B
C
Generated
/* This is a generated file, edit random.stub.php instead.
|
|
* Stub hash: 245fb5b66e540814c8595a06182886aee3e32f2c */
|
|
|
|
#ifndef ZEND_RANDOM_DECL_245fb5b66e540814c8595a06182886aee3e32f2c_H
|
|
#define ZEND_RANDOM_DECL_245fb5b66e540814c8595a06182886aee3e32f2c_H
|
|
|
|
typedef enum zend_enum_Random_IntervalBoundary {
|
|
ZEND_ENUM_Random_IntervalBoundary_ClosedOpen = 1,
|
|
ZEND_ENUM_Random_IntervalBoundary_ClosedClosed = 2,
|
|
ZEND_ENUM_Random_IntervalBoundary_OpenClosed = 3,
|
|
ZEND_ENUM_Random_IntervalBoundary_OpenOpen = 4,
|
|
} zend_enum_Random_IntervalBoundary;
|
|
|
|
#endif /* ZEND_RANDOM_DECL_245fb5b66e540814c8595a06182886aee3e32f2c_H */
|