mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
[rust] adjust bindgen imports.
- only import functions from the notcurses public API - exclude more unneeded types from being imported. - use custom `__va_list_tag`
This commit is contained in:
parent
66e20bdac8
commit
7e7082e836
@ -30,10 +30,18 @@ fn main() {
|
||||
.generate_comments(true)
|
||||
.clang_arg("-fretain-comments-from-system-headers")
|
||||
.clang_arg("-fparse-all-comments")
|
||||
// Remove warnings about improper_ctypes
|
||||
.blacklist_function("strtold")
|
||||
.blacklist_function("wcstold")
|
||||
.blacklist_function("socketpair")
|
||||
// only import functions from notcurses public API
|
||||
.blacklist_function("[^n].*")
|
||||
.blacklist_function("n[^co].*")
|
||||
// clean more unneeded types
|
||||
.blacklist_item("_[A-FHJ-Z].*")
|
||||
.blacklist_item("__[A-Z].*")
|
||||
.blacklist_item("[ADHJ-MQ-Z].*")
|
||||
.blacklist_item("IP[^R].*")
|
||||
.blacklist_item("PF.*")
|
||||
.blacklist_item("MSG_.*")
|
||||
.blacklist_item("N[^C].*")
|
||||
.blacklist_type("_bindgen.*")
|
||||
// Don't derive the Copy trait on types with destructors.
|
||||
.no_copy("ncdirect")
|
||||
.no_copy("ncdplot")
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use core::ptr::null_mut;
|
||||
|
||||
use crate::ffi::__va_list_tag;
|
||||
use crate::__va_list_tag;
|
||||
use crate::{
|
||||
cstring, nccell_release, NcAlign, NcAlphaBits, NcBoxMask, NcCell, NcChannel, NcChannelPair,
|
||||
NcColor, NcDim, NcEgc, NcIntResult, NcPlane, NcRgb, NcStyleMask, NCRESULT_ERR, NCRESULT_OK,
|
||||
|
Loading…
x
Reference in New Issue
Block a user