1
0

feat: add object pool for cdylib

This commit is contained in:
2026-05-09 16:27:04 +08:00
parent d4b52efee0
commit 6804b96078
5 changed files with 96 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ use std::cell::RefCell;
use std::ffi::{CString, c_char};
use thiserror::Error as TeError;
mod object_pool;
mod last_error;
mod string_cache;
mod wrapper;
@@ -11,9 +12,12 @@ mod wrapper;
/// Error occurs in this crate.
#[derive(Debug, TeError)]
enum Error {
/// Error occurs in wfassoc core.
/// Error when parsing Schema into Program.
#[error("{0}")]
Core(#[from] wfassoc::Error),
ParseProgram(#[from] wfassoc::highlevel::ParseProgramError),
/// Error when operating Program.
#[error("{0}")]
Program(#[from] wfassoc::highlevel::ProgramError),
#[error("error occurs when parsing into C/C++ string")]
CastIntoCStr(#[from] std::ffi::NulError),
@@ -48,7 +52,7 @@ pub extern "C" fn WFGetLastError() -> *const c_char {
#[unsafe(no_mangle)]
pub extern "C" fn WFHasPrivilege() -> bool {
wfassoc::utilities::has_privilege()
wfassoc::win32::utilities::has_privilege()
}
#[unsafe(no_mangle)]