libperl_sys/perl_core.rs
1//! Auto-generated FFI declarations (bindgen + libperl-macrogen output).
2//!
3#![doc = concat!(
4 "Built against Perl ", env!("LIBPERL_SYS_PERL_VERSION"),
5 " (", env!("LIBPERL_SYS_PERL_THREADED"),
6 ", `", env!("LIBPERL_SYS_PERL_ARCHNAME"), "`).",
7)]
8//!
9//! See the [crate root](crate) for build-target details and version
10//! constants.
11#![allow(non_upper_case_globals)]
12#![allow(non_camel_case_types)]
13#![allow(non_snake_case)]
14#![allow(unnecessary_transmutes)]
15#![allow(unpredictable_function_pointer_comparisons)]
16#![allow(unused_imports)]
17#![allow(unused_mut)]
18#![allow(unused_unsafe)]
19#![allow(unused_variables)]
20
21include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
22
23include!(concat!(env!("OUT_DIR"), "/macro_bindings.rs"));
24
25#[cfg(perlapi_ver40)]
26pub type perl_stack_size_t = isize;
27
28#[cfg(not(perlapi_ver40))]
29pub type perl_stack_size_t = i32;
30
31// Compat: `Stack_off_t` first appeared in the perl 5.40 stack refactor;
32// before that the mark stack was plain `I32`. Alias it on older perls so
33// downstream code can use `Stack_off_t` uniformly across versions
34// (bindgen emits the real typedef on 5.40+).
35#[cfg(not(perlapi_ver40))]
36pub type Stack_off_t = I32;
37
38// Compat: perl 5.31.x renamed the inline refcount helper `S_SvREFCNT_dec`
39// to `Perl_SvREFCNT_dec`, so the `Perl_` name only exists from 5.32 on.
40// On 5.28/5.30 macrogen generates `S_SvREFCNT_dec` with the identical
41// signature (libperl-macrogen apidoc data 1.14); alias it so downstream
42// code can call `Perl_SvREFCNT_dec` uniformly across versions. Gated to
43// >= 5.28 because older perls don't generate `S_SvREFCNT_dec` yet.
44#[cfg(all(perlapi_ver28, not(perlapi_ver32)))]
45pub use self::S_SvREFCNT_dec as Perl_SvREFCNT_dec;