Skip to content

Commit 582a387

Browse files
committed
Cleanup
1 parent 9ff4bd4 commit 582a387

File tree

2 files changed

+176
-1
lines changed

2 files changed

+176
-1
lines changed

docsrs_bindings.rs

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ pub const ZEND_MODULE_API_NO: u32 = 20230831;
182182
pub const USING_ZTS: u32 = 0;
183183
pub const MAY_BE_BOOL: u32 = 12;
184184
pub const MAY_BE_ANY: u32 = 1022;
185+
pub const TRACK_VARS_POST: u32 = 0;
186+
pub const TRACK_VARS_GET: u32 = 1;
187+
pub const TRACK_VARS_COOKIE: u32 = 2;
188+
pub const TRACK_VARS_SERVER: u32 = 3;
189+
pub const TRACK_VARS_ENV: u32 = 4;
190+
pub const TRACK_VARS_FILES: u32 = 5;
191+
pub const TRACK_VARS_REQUEST: u32 = 6;
185192
pub const PHP_INI_USER: u32 = 1;
186193
pub const PHP_INI_PERDIR: u32 = 2;
187194
pub const PHP_INI_SYSTEM: u32 = 4;
@@ -506,6 +513,19 @@ pub struct _zend_llist {
506513
pub traverse_ptr: *mut zend_llist_element,
507514
}
508515
pub type zend_llist = _zend_llist;
516+
pub type zend_llist_position = *mut zend_llist_element;
517+
extern "C" {
518+
pub fn zend_llist_get_next_ex(
519+
l: *mut zend_llist,
520+
pos: *mut zend_llist_position,
521+
) -> *mut ::std::os::raw::c_void;
522+
}
523+
extern "C" {
524+
pub fn zend_llist_get_prev_ex(
525+
l: *mut zend_llist,
526+
pos: *mut zend_llist_position,
527+
) -> *mut ::std::os::raw::c_void;
528+
}
509529
pub type zend_string_init_interned_func_t = ::std::option::Option<
510530
unsafe extern "C" fn(
511531
str_: *const ::std::os::raw::c_char,
@@ -1469,6 +1489,9 @@ pub struct _zend_executor_globals {
14691489
pub reserved_stack_size: zend_ulong,
14701490
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
14711491
}
1492+
extern "C" {
1493+
pub fn zend_is_auto_global(name: *mut zend_string) -> bool;
1494+
}
14721495
pub type zend_module_entry = _zend_module_entry;
14731496
#[repr(C)]
14741497
#[derive(Debug, Copy, Clone)]
@@ -2094,6 +2117,127 @@ impl _php_stream {
20942117
__bindgen_bitfield_unit
20952118
}
20962119
}
2120+
extern "C" {
2121+
pub static mut php_stream_stdio_ops: php_stream_ops;
2122+
}
2123+
extern "C" {
2124+
pub fn php_register_url_stream_wrapper(
2125+
protocol: *const ::std::os::raw::c_char,
2126+
wrapper: *const php_stream_wrapper,
2127+
) -> zend_result;
2128+
}
2129+
extern "C" {
2130+
pub fn php_unregister_url_stream_wrapper(
2131+
protocol: *const ::std::os::raw::c_char,
2132+
) -> zend_result;
2133+
}
2134+
extern "C" {
2135+
pub fn php_register_url_stream_wrapper_volatile(
2136+
protocol: *mut zend_string,
2137+
wrapper: *mut php_stream_wrapper,
2138+
) -> zend_result;
2139+
}
2140+
extern "C" {
2141+
pub fn php_unregister_url_stream_wrapper_volatile(protocol: *mut zend_string) -> zend_result;
2142+
}
2143+
extern "C" {
2144+
pub fn php_stream_locate_url_wrapper(
2145+
path: *const ::std::os::raw::c_char,
2146+
path_for_open: *mut *const ::std::os::raw::c_char,
2147+
options: ::std::os::raw::c_int,
2148+
) -> *mut php_stream_wrapper;
2149+
}
2150+
pub type php_core_globals = _php_core_globals;
2151+
#[repr(C)]
2152+
pub struct _php_core_globals {
2153+
pub output_buffering: zend_long,
2154+
pub implicit_flush: bool,
2155+
pub enable_dl: bool,
2156+
pub display_errors: u8,
2157+
pub display_startup_errors: bool,
2158+
pub log_errors: bool,
2159+
pub ignore_repeated_errors: bool,
2160+
pub ignore_repeated_source: bool,
2161+
pub report_memleaks: bool,
2162+
pub output_handler: *mut ::std::os::raw::c_char,
2163+
pub unserialize_callback_func: *mut ::std::os::raw::c_char,
2164+
pub serialize_precision: zend_long,
2165+
pub memory_limit: zend_long,
2166+
pub max_input_time: zend_long,
2167+
pub error_log: *mut ::std::os::raw::c_char,
2168+
pub doc_root: *mut ::std::os::raw::c_char,
2169+
pub user_dir: *mut ::std::os::raw::c_char,
2170+
pub include_path: *mut ::std::os::raw::c_char,
2171+
pub open_basedir: *mut ::std::os::raw::c_char,
2172+
pub open_basedir_modified: bool,
2173+
pub extension_dir: *mut ::std::os::raw::c_char,
2174+
pub php_binary: *mut ::std::os::raw::c_char,
2175+
pub sys_temp_dir: *mut ::std::os::raw::c_char,
2176+
pub upload_tmp_dir: *mut ::std::os::raw::c_char,
2177+
pub upload_max_filesize: zend_long,
2178+
pub error_append_string: *mut ::std::os::raw::c_char,
2179+
pub error_prepend_string: *mut ::std::os::raw::c_char,
2180+
pub auto_prepend_file: *mut ::std::os::raw::c_char,
2181+
pub auto_append_file: *mut ::std::os::raw::c_char,
2182+
pub input_encoding: *mut ::std::os::raw::c_char,
2183+
pub internal_encoding: *mut ::std::os::raw::c_char,
2184+
pub output_encoding: *mut ::std::os::raw::c_char,
2185+
pub arg_separator: arg_separators,
2186+
pub variables_order: *mut ::std::os::raw::c_char,
2187+
pub rfc1867_protected_variables: HashTable,
2188+
pub connection_status: ::std::os::raw::c_short,
2189+
pub ignore_user_abort: bool,
2190+
pub header_is_being_sent: ::std::os::raw::c_uchar,
2191+
pub tick_functions: zend_llist,
2192+
pub http_globals: [zval; 6usize],
2193+
pub expose_php: bool,
2194+
pub register_argc_argv: bool,
2195+
pub auto_globals_jit: bool,
2196+
pub html_errors: bool,
2197+
pub xmlrpc_errors: bool,
2198+
pub docref_root: *mut ::std::os::raw::c_char,
2199+
pub docref_ext: *mut ::std::os::raw::c_char,
2200+
pub xmlrpc_error_number: zend_long,
2201+
pub activated_auto_globals: [bool; 8usize],
2202+
pub modules_activated: bool,
2203+
pub file_uploads: bool,
2204+
pub during_request_startup: bool,
2205+
pub allow_url_fopen: bool,
2206+
pub enable_post_data_reading: bool,
2207+
pub report_zend_debug: bool,
2208+
pub last_error_type: ::std::os::raw::c_int,
2209+
pub last_error_lineno: ::std::os::raw::c_int,
2210+
pub last_error_message: *mut zend_string,
2211+
pub last_error_file: *mut zend_string,
2212+
pub php_sys_temp_dir: *mut ::std::os::raw::c_char,
2213+
pub disable_classes: *mut ::std::os::raw::c_char,
2214+
pub max_input_nesting_level: zend_long,
2215+
pub max_input_vars: zend_long,
2216+
pub user_ini_filename: *mut ::std::os::raw::c_char,
2217+
pub user_ini_cache_ttl: zend_long,
2218+
pub request_order: *mut ::std::os::raw::c_char,
2219+
pub mail_log: *mut ::std::os::raw::c_char,
2220+
pub mail_x_header: bool,
2221+
pub mail_mixed_lf_and_crlf: bool,
2222+
pub in_error_log: bool,
2223+
pub allow_url_include: bool,
2224+
pub in_user_include: bool,
2225+
pub have_called_openlog: bool,
2226+
pub syslog_facility: zend_long,
2227+
pub syslog_ident: *mut ::std::os::raw::c_char,
2228+
pub syslog_filter: zend_long,
2229+
pub error_log_mode: zend_long,
2230+
}
2231+
extern "C" {
2232+
pub static mut core_globals: _php_core_globals;
2233+
}
2234+
#[repr(C)]
2235+
#[derive(Debug, Copy, Clone)]
2236+
pub struct _arg_separators {
2237+
pub output: *mut ::std::os::raw::c_char,
2238+
pub input: *mut ::std::os::raw::c_char,
2239+
}
2240+
pub type arg_separators = _arg_separators;
20972241
#[repr(C)]
20982242
#[derive(Debug, Copy, Clone)]
20992243
pub struct _zend_ini_entry_def {
@@ -2201,6 +2345,37 @@ extern "C" {
22012345
extern "C" {
22022346
pub fn php_info_print_table_end();
22032347
}
2348+
#[repr(C)]
2349+
#[derive(Debug, Copy, Clone)]
2350+
pub struct hostent {
2351+
pub h_name: *mut ::std::os::raw::c_char,
2352+
pub h_aliases: *mut *mut ::std::os::raw::c_char,
2353+
pub h_addrtype: ::std::os::raw::c_int,
2354+
pub h_length: ::std::os::raw::c_int,
2355+
pub h_addr_list: *mut *mut ::std::os::raw::c_char,
2356+
}
2357+
#[repr(C)]
2358+
#[derive(Debug, Copy, Clone)]
2359+
pub struct php_file_globals {
2360+
pub pclose_ret: ::std::os::raw::c_int,
2361+
pub def_chunk_size: usize,
2362+
pub auto_detect_line_endings: bool,
2363+
pub default_socket_timeout: zend_long,
2364+
pub user_agent: *mut ::std::os::raw::c_char,
2365+
pub from_address: *mut ::std::os::raw::c_char,
2366+
pub user_stream_current_filename: *const ::std::os::raw::c_char,
2367+
pub default_context: *mut php_stream_context,
2368+
pub stream_wrappers: *mut HashTable,
2369+
pub stream_filters: *mut HashTable,
2370+
pub wrapper_errors: *mut HashTable,
2371+
pub pclose_wait: ::std::os::raw::c_int,
2372+
pub tmp_host_info: hostent,
2373+
pub tmp_host_buf: *mut ::std::os::raw::c_char,
2374+
pub tmp_host_buf_len: usize,
2375+
}
2376+
extern "C" {
2377+
pub static mut file_globals: php_file_globals;
2378+
}
22042379
extern "C" {
22052380
pub static mut zend_ce_throwable: *mut zend_class_entry;
22062381
}

src/zend/ex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::ffi::{_zend_function, zend_execute_data, ZEND_MM_ALIGNMENT, ZEND_MM_ALIGNMENT_MASK};
1+
use crate::ffi::{zend_execute_data, ZEND_MM_ALIGNMENT, ZEND_MM_ALIGNMENT_MASK};
22

33
use crate::{
44
args::ArgParser,

0 commit comments

Comments
 (0)