ext-php-rs 0.10.0

Bindings for the Zend API to build PHP extensions natively in Rust.
Documentation
//! Raw FFI bindings to the Zend API.

#![allow(clippy::all)]
#![allow(warnings)]

use std::{ffi::c_void, os::raw::c_char};

pub const ZEND_MM_ALIGNMENT: u32 = 8;
pub const ZEND_MM_ALIGNMENT_MASK: i32 = -8;

// These are not generated by Bindgen as everything in `bindings.rs` will have
// the `#[link(name = "php")]` attribute appended. This will cause the wrapper
// functions to fail to link.
#[link(name = "wrapper")]
extern "C" {
    pub fn ext_php_rs_zend_string_init(
        str_: *const c_char,
        len: usize,
        persistent: bool,
    ) -> *mut zend_string;
    pub fn ext_php_rs_zend_string_release(zs: *mut zend_string);
    pub fn ext_php_rs_is_known_valid_utf8(zs: *const zend_string) -> bool;
    pub fn ext_php_rs_set_known_valid_utf8(zs: *mut zend_string);

    pub fn ext_php_rs_php_build_id() -> *const c_char;
    pub fn ext_php_rs_zend_object_alloc(obj_size: usize, ce: *mut zend_class_entry) -> *mut c_void;
    pub fn ext_php_rs_zend_object_release(obj: *mut zend_object);
    pub fn ext_php_rs_executor_globals() -> *mut zend_executor_globals;
}

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));