use std::ffi::CStr;
use crate::base::builtin;
unsafe impl Sync for builtin {}
unsafe impl Send for builtin {}
impl builtin {
pub const fn new(
name: &'static CStr,
handler: super::types::HandlerFuncInner,
minargs: i32,
maxargs: i32,
id: i32,
optstr: &'static CStr,
) -> Self {
Self {
node: crate::base::hashnode {
next: std::ptr::null_mut(),
nam: name.as_ptr() as _,
flags: 0,
},
handlerfunc: Some(handler),
minargs,
maxargs,
funcid: id,
optstr: optstr.as_ptr() as _,
defopts: std::ptr::null_mut(),
}
}
}