Skip to content

Commit a776d3e

Browse files
committed
Fix CI on macOS + docs stubs
1 parent a09b847 commit a776d3e

File tree

2 files changed

+96
-61
lines changed

2 files changed

+96
-61
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
build:
1010
name: Build and Test
11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
1414
os:

docsrs_bindings.rs

Lines changed: 95 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
pub const ZEND_DEBUG: u32 = 1;
44
pub const ZEND_MM_ALIGNMENT: u32 = 8;
5-
pub const _ZEND_TYPE_NAME_BIT: u32 = 8388608;
5+
pub const _ZEND_TYPE_NAME_BIT: u32 = 16777216;
66
pub const _ZEND_TYPE_NULLABLE_BIT: u32 = 2;
77
pub const HT_MIN_SIZE: u32 = 8;
88
pub const IS_UNDEF: u32 = 0;
@@ -21,7 +21,7 @@ pub const IS_CALLABLE: u32 = 12;
2121
pub const IS_VOID: u32 = 14;
2222
pub const IS_MIXED: u32 = 16;
2323
pub const IS_PTR: u32 = 13;
24-
pub const _IS_BOOL: u32 = 17;
24+
pub const _IS_BOOL: u32 = 18;
2525
pub const Z_TYPE_FLAGS_SHIFT: u32 = 8;
2626
pub const IS_TYPE_REFCOUNTED: u32 = 1;
2727
pub const IS_TYPE_COLLECTABLE: u32 = 2;
@@ -56,13 +56,12 @@ pub const ZEND_ACC_USE_GUARDS: u32 = 2048;
5656
pub const ZEND_ACC_CONSTANTS_UPDATED: u32 = 4096;
5757
pub const ZEND_ACC_NO_DYNAMIC_PROPERTIES: u32 = 8192;
5858
pub const ZEND_HAS_STATIC_IN_METHODS: u32 = 16384;
59-
pub const ZEND_ACC_PROPERTY_TYPES_RESOLVED: u32 = 32768;
6059
pub const ZEND_ACC_REUSE_GET_ITERATOR: u32 = 65536;
6160
pub const ZEND_ACC_RESOLVED_PARENT: u32 = 131072;
6261
pub const ZEND_ACC_RESOLVED_INTERFACES: u32 = 262144;
6362
pub const ZEND_ACC_UNRESOLVED_VARIANCE: u32 = 524288;
6463
pub const ZEND_ACC_NEARLY_LINKED: u32 = 1048576;
65-
pub const ZEND_ACC_HAS_UNLINKED_USES: u32 = 2097152;
64+
pub const ZEND_ACC_NOT_SERIALIZABLE: u32 = 536870912;
6665
pub const ZEND_ACC_DEPRECATED: u32 = 2048;
6766
pub const ZEND_ACC_RETURN_REFERENCE: u32 = 4096;
6867
pub const ZEND_ACC_HAS_RETURN_TYPE: u32 = 8192;
@@ -81,30 +80,20 @@ pub const ZEND_ACC_DONE_PASS_TWO: u32 = 33554432;
8180
pub const ZEND_ACC_HEAP_RT_CACHE: u32 = 67108864;
8281
pub const ZEND_ACC_STRICT_TYPES: u32 = 2147483648;
8382
pub const ZEND_ISEMPTY: u32 = 1;
84-
pub const _ZEND_SEND_MODE_SHIFT: u32 = 24;
85-
pub const _ZEND_IS_VARIADIC_BIT: u32 = 67108864;
86-
pub const ZEND_MODULE_API_NO: u32 = 20200930;
83+
pub const _ZEND_SEND_MODE_SHIFT: u32 = 25;
84+
pub const _ZEND_IS_VARIADIC_BIT: u32 = 134217728;
85+
pub const ZEND_MODULE_API_NO: u32 = 20210902;
8786
pub const USING_ZTS: u32 = 0;
8887
pub const MAY_BE_BOOL: u32 = 12;
8988
pub const MAY_BE_ANY: u32 = 1022;
9089
pub const CONST_CS: u32 = 0;
9190
pub const CONST_PERSISTENT: u32 = 1;
9291
pub const CONST_NO_FILE_CACHE: u32 = 2;
9392
pub const CONST_DEPRECATED: u32 = 4;
94-
pub type size_t = ::std::os::raw::c_ulong;
95-
pub type __uint8_t = ::std::os::raw::c_uchar;
96-
pub type __uint16_t = ::std::os::raw::c_ushort;
97-
pub type __uint32_t = ::std::os::raw::c_uint;
98-
pub type __int64_t = ::std::os::raw::c_long;
99-
pub type __uint64_t = ::std::os::raw::c_ulong;
100-
#[repr(C)]
101-
#[derive(Debug, Copy, Clone)]
102-
pub struct __sigset_t {
103-
pub __val: [::std::os::raw::c_ulong; 16usize],
104-
}
93+
pub type __darwin_size_t = ::std::os::raw::c_ulong;
94+
pub type size_t = __darwin_size_t;
10595
pub type zend_long = i64;
10696
pub type zend_ulong = u64;
107-
pub type zend_bool = bool;
10897
pub type zend_uchar = ::std::os::raw::c_uchar;
10998
pub const ZEND_RESULT_CODE_SUCCESS: ZEND_RESULT_CODE = 0;
11099
pub const ZEND_RESULT_CODE_FAILURE: ZEND_RESULT_CODE = -1;
@@ -130,6 +119,7 @@ pub struct zend_type {
130119
pub type_mask: u32,
131120
}
132121
#[repr(C)]
122+
#[derive(Copy, Clone)]
133123
pub union _zend_value {
134124
pub lval: zend_long,
135125
pub dval: f64,
@@ -187,7 +177,6 @@ pub union _zval_struct__bindgen_ty_2 {
187177
pub num_args: u32,
188178
pub fe_pos: u32,
189179
pub fe_iter_idx: u32,
190-
pub access_flags: u32,
191180
pub property_guard: u32,
192181
pub constant_flags: u32,
193182
pub extra: u32,
@@ -272,7 +261,7 @@ pub struct _zend_object {
272261
#[derive(Copy, Clone)]
273262
pub struct _zend_resource {
274263
pub gc: zend_refcounted_h,
275-
pub handle: ::std::os::raw::c_int,
264+
pub handle: zend_long,
276265
pub type_: ::std::os::raw::c_int,
277266
pub ptr: *mut ::std::os::raw::c_void,
278267
}
@@ -368,6 +357,9 @@ extern "C" {
368357
extern "C" {
369358
pub fn zend_array_destroy(ht: *mut HashTable);
370359
}
360+
extern "C" {
361+
pub fn gc_possible_root(ref_: *mut zend_refcounted);
362+
}
371363
#[repr(C)]
372364
#[derive(Debug, Copy, Clone)]
373365
pub struct zend_get_gc_buffer {
@@ -467,6 +459,43 @@ pub struct _zend_trait_alias {
467459
}
468460
pub type zend_trait_alias = _zend_trait_alias;
469461
#[repr(C)]
462+
#[derive(Debug, Copy, Clone)]
463+
pub struct _zend_class_mutable_data {
464+
pub default_properties_table: *mut zval,
465+
pub constants_table: *mut HashTable,
466+
pub ce_flags: u32,
467+
}
468+
pub type zend_class_mutable_data = _zend_class_mutable_data;
469+
#[repr(C)]
470+
#[derive(Debug, Copy, Clone)]
471+
pub struct _zend_class_dependency {
472+
pub name: *mut zend_string,
473+
pub ce: *mut zend_class_entry,
474+
}
475+
pub type zend_class_dependency = _zend_class_dependency;
476+
pub type zend_inheritance_cache_entry = _zend_inheritance_cache_entry;
477+
#[repr(C)]
478+
#[derive(Debug, Copy, Clone)]
479+
pub struct _zend_error_info {
480+
pub type_: ::std::os::raw::c_int,
481+
pub lineno: u32,
482+
pub filename: *mut zend_string,
483+
pub message: *mut zend_string,
484+
}
485+
pub type zend_error_info = _zend_error_info;
486+
#[repr(C)]
487+
#[derive(Debug, Copy, Clone)]
488+
pub struct _zend_inheritance_cache_entry {
489+
pub next: *mut zend_inheritance_cache_entry,
490+
pub ce: *mut zend_class_entry,
491+
pub parent: *mut zend_class_entry,
492+
pub dependencies: *mut zend_class_dependency,
493+
pub dependencies_count: u32,
494+
pub num_warnings: u32,
495+
pub warnings: *mut *mut zend_error_info,
496+
pub traits_and_interfaces: [*mut zend_class_entry; 1usize],
497+
}
498+
#[repr(C)]
470499
pub struct _zend_class_entry {
471500
pub type_: ::std::os::raw::c_char,
472501
pub name: *mut zend_string,
@@ -481,6 +510,8 @@ pub struct _zend_class_entry {
481510
pub function_table: HashTable,
482511
pub properties_info: HashTable,
483512
pub constants_table: HashTable,
513+
pub mutable_data__ptr: *mut *mut zend_class_mutable_data,
514+
pub inheritance_cache: *mut zend_inheritance_cache_entry,
484515
pub properties_info_table: *mut *mut _zend_property_info,
485516
pub constructor: *mut zend_function,
486517
pub destructor: *mut zend_function,
@@ -534,6 +565,8 @@ pub struct _zend_class_entry {
534565
pub trait_aliases: *mut *mut zend_trait_alias,
535566
pub trait_precedences: *mut *mut zend_trait_precedence,
536567
pub attributes: *mut HashTable,
568+
pub enum_backing_type: u32,
569+
pub backed_enum_table: *mut HashTable,
537570
pub info: _zend_class_entry__bindgen_ty_4,
538571
}
539572
#[repr(C)]
@@ -675,10 +708,10 @@ pub type zend_object_get_method_t = ::std::option::Option<
675708
>;
676709
pub type zend_object_get_constructor_t =
677710
::std::option::Option<unsafe extern "C" fn(object: *mut zend_object) -> *mut zend_function>;
678-
pub type zend_object_dtor_obj_t =
679-
::std::option::Option<unsafe extern "C" fn(object: *mut zend_object)>;
680711
pub type zend_object_free_obj_t =
681712
::std::option::Option<unsafe extern "C" fn(object: *mut zend_object)>;
713+
pub type zend_object_dtor_obj_t =
714+
::std::option::Option<unsafe extern "C" fn(object: *mut zend_object)>;
682715
pub type zend_object_clone_obj_t =
683716
::std::option::Option<unsafe extern "C" fn(object: *mut zend_object) -> *mut zend_object>;
684717
pub type zend_object_get_class_name_t =
@@ -702,7 +735,7 @@ pub type zend_object_get_closure_t = ::std::option::Option<
702735
ce_ptr: *mut *mut zend_class_entry,
703736
fptr_ptr: *mut *mut zend_function,
704737
obj_ptr: *mut *mut zend_object,
705-
check_only: zend_bool,
738+
check_only: bool,
706739
) -> ::std::os::raw::c_int,
707740
>;
708741
pub type zend_object_get_gc_t = ::std::option::Option<
@@ -885,7 +918,9 @@ pub struct _zend_op_array {
885918
pub line_end: u32,
886919
pub doc_comment: *mut zend_string,
887920
pub last_literal: ::std::os::raw::c_int,
921+
pub num_dynamic_func_defs: u32,
888922
pub literals: *mut zval,
923+
pub dynamic_func_defs: *mut *mut zend_op_array,
889924
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
890925
}
891926
pub type zif_handler = ::std::option::Option<
@@ -944,16 +979,11 @@ pub struct _zend_execute_data {
944979
pub run_time_cache: *mut *mut ::std::os::raw::c_void,
945980
pub extra_named_params: *mut zend_array,
946981
}
947-
pub type __jmp_buf = [::std::os::raw::c_long; 8usize];
948-
#[repr(C)]
949-
#[derive(Debug, Copy, Clone)]
950-
pub struct __jmp_buf_tag {
951-
pub __jmpbuf: __jmp_buf,
952-
pub __mask_was_saved: ::std::os::raw::c_int,
953-
pub __saved_mask: __sigset_t,
954-
}
955-
pub type jmp_buf = [__jmp_buf_tag; 1usize];
982+
pub type sigjmp_buf = [::std::os::raw::c_int; 49usize];
956983
pub type zend_executor_globals = _zend_executor_globals;
984+
extern "C" {
985+
pub static mut executor_globals: zend_executor_globals;
986+
}
957987
#[repr(C)]
958988
#[derive(Debug, Copy, Clone)]
959989
pub struct _zend_stack {
@@ -984,9 +1014,24 @@ pub struct _zend_objects_store {
9841014
pub free_list_head: ::std::os::raw::c_int,
9851015
}
9861016
pub type zend_objects_store = _zend_objects_store;
1017+
extern "C" {
1018+
pub fn zend_objects_store_del(object: *mut zend_object);
1019+
}
9871020
pub type zend_vm_stack = *mut _zend_vm_stack;
9881021
pub type zend_ini_entry = _zend_ini_entry;
9891022
#[repr(C)]
1023+
#[derive(Debug, Copy, Clone)]
1024+
pub struct _zend_fiber_context {
1025+
_unused: [u8; 0],
1026+
}
1027+
pub type zend_fiber_context = _zend_fiber_context;
1028+
#[repr(C)]
1029+
#[derive(Debug, Copy, Clone)]
1030+
pub struct _zend_fiber {
1031+
_unused: [u8; 0],
1032+
}
1033+
pub type zend_fiber = _zend_fiber;
1034+
#[repr(C)]
9901035
pub struct _zend_executor_globals {
9911036
pub uninitialized_zval: zval,
9921037
pub error_zval: zval,
@@ -995,7 +1040,7 @@ pub struct _zend_executor_globals {
9951040
pub symtable_cache_ptr: *mut *mut zend_array,
9961041
pub symbol_table: zend_array,
9971042
pub included_files: HashTable,
998-
pub bailout: *mut jmp_buf,
1043+
pub bailout: *mut sigjmp_buf,
9991044
pub error_reporting: ::std::os::raw::c_int,
10001045
pub exit_status: ::std::os::raw::c_int,
10011046
pub function_table: *mut HashTable,
@@ -1014,10 +1059,10 @@ pub struct _zend_executor_globals {
10141059
pub persistent_functions_count: u32,
10151060
pub persistent_classes_count: u32,
10161061
pub in_autoload: *mut HashTable,
1017-
pub full_tables_cleanup: zend_bool,
1018-
pub no_extensions: zend_bool,
1019-
pub vm_interrupt: zend_bool,
1020-
pub timed_out: zend_bool,
1062+
pub full_tables_cleanup: bool,
1063+
pub no_extensions: bool,
1064+
pub vm_interrupt: bool,
1065+
pub timed_out: bool,
10211066
pub hard_timeout: zend_long,
10221067
pub regular_list: HashTable,
10231068
pub persistent_list: HashTable,
@@ -1030,7 +1075,7 @@ pub struct _zend_executor_globals {
10301075
pub error_handling: zend_error_handling_t,
10311076
pub exception_class: *mut zend_class_entry,
10321077
pub timeout_seconds: zend_long,
1033-
pub lambda_count: ::std::os::raw::c_int,
1078+
pub capture_warnings_during_sccp: ::std::os::raw::c_int,
10341079
pub ini_directives: *mut HashTable,
10351080
pub modified_ini_directives: *mut HashTable,
10361081
pub error_reporting_ini_entry: *mut zend_ini_entry,
@@ -1040,7 +1085,7 @@ pub struct _zend_executor_globals {
10401085
pub opline_before_exception: *const zend_op,
10411086
pub exception_op: [zend_op; 3usize],
10421087
pub current_module: *mut _zend_module_entry,
1043-
pub active: zend_bool,
1088+
pub active: bool,
10441089
pub flags: zend_uchar,
10451090
pub assertions: zend_long,
10461091
pub ht_iterators_count: u32,
@@ -1051,9 +1096,16 @@ pub struct _zend_executor_globals {
10511096
pub trampoline: zend_function,
10521097
pub call_trampoline_op: zend_op,
10531098
pub weakrefs: HashTable,
1054-
pub exception_ignore_args: zend_bool,
1099+
pub exception_ignore_args: bool,
10551100
pub exception_string_param_max_len: zend_long,
10561101
pub get_gc_buffer: zend_get_gc_buffer,
1102+
pub main_fiber_context: *mut zend_fiber_context,
1103+
pub current_fiber_context: *mut zend_fiber_context,
1104+
pub active_fiber: *mut zend_fiber,
1105+
pub fiber_stack_size: zend_long,
1106+
pub record_errors: bool,
1107+
pub num_errors: u32,
1108+
pub errors: *mut *mut zend_error_info,
10571109
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
10581110
}
10591111
pub type zend_module_entry = _zend_module_entry;
@@ -1150,7 +1202,7 @@ extern "C" {
11501202
callable: *mut zval,
11511203
check_flags: u32,
11521204
callable_name: *mut *mut zend_string,
1153-
) -> zend_bool;
1205+
) -> bool;
11541206
}
11551207
extern "C" {
11561208
pub fn zend_declare_property(
@@ -1261,7 +1313,7 @@ extern "C" {
12611313
pub fn zend_register_bool_constant(
12621314
name: *const ::std::os::raw::c_char,
12631315
name_len: size_t,
1264-
bval: zend_bool,
1316+
bval: bool,
12651317
flags: ::std::os::raw::c_int,
12661318
module_number: ::std::os::raw::c_int,
12671319
);
@@ -1349,23 +1401,6 @@ extern "C" {
13491401
extern "C" {
13501402
pub fn zend_do_implement_interface(ce: *mut zend_class_entry, iface: *mut zend_class_entry);
13511403
}
1352-
extern "C" {
1353-
pub fn zend_class_serialize_deny(
1354-
object: *mut zval,
1355-
buffer: *mut *mut ::std::os::raw::c_uchar,
1356-
buf_len: *mut size_t,
1357-
data: *mut zend_serialize_data,
1358-
) -> ::std::os::raw::c_int;
1359-
}
1360-
extern "C" {
1361-
pub fn zend_class_unserialize_deny(
1362-
object: *mut zval,
1363-
ce: *mut zend_class_entry,
1364-
buf: *const ::std::os::raw::c_uchar,
1365-
buf_len: size_t,
1366-
data: *mut zend_unserialize_data,
1367-
) -> ::std::os::raw::c_int;
1368-
}
13691404
extern "C" {
13701405
pub fn ext_php_rs_zend_string_init(
13711406
str_: *const ::std::os::raw::c_char,

0 commit comments

Comments
 (0)