Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oberrich committed Apr 10, 2024
1 parent ddde5e7 commit 9172d3d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#![doc = include_str!("../README.md")]
#![allow(
warnings,
unused,
non_snake_case,
non_camel_case_types,
non_upper_case_globals
)]
// MIT License
//
// Copyright (c) 2024 oberrich <[email protected]>
Expand All @@ -28,16 +20,27 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
#![doc = include_str!("../README.md")]
#![allow(
warnings,
unused,
non_snake_case,
non_camel_case_types,
non_upper_case_globals
)]

/// Bindings for `phnt` (nightly) generated by `bindgen`
pub mod ffi {
// use vendored `generated.rs` for docs.rs
#[cfg(feature = "docsrs")]
include!("ffi/generated.rs");

// use regenerated bindings in production
#[cfg(not(feature = "docsrs"))]
include!(concat!(env!("OUT_DIR"), "\\generated.rs"));
}

/// Extensions to the bindings (useful functions, macros, etc.)
pub mod ext {
use crate::ffi::*;
use std::arch::asm;
Expand All @@ -54,7 +57,7 @@ pub mod ext {
_o.SecurityQualityOfService = ::std::ptr::null_mut();
}};
}

macro_rules! FIELD_OFFSET {
($_type:ty, $field:ident$(.$cfields:ident)*) => {{
let obj = core::mem::MaybeUninit::<$_type>::uninit();
Expand Down

0 comments on commit 9172d3d

Please sign in to comment.