Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
abbiecnt committed Sep 3, 2024
1 parent 5ece98c commit b595cee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
9 changes: 0 additions & 9 deletions examples/sections.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
use inka::program;

#[no_mangle]
#[export_name = "test_c"]
#[inline(never)]
pub extern "C" fn test() {
println!("Hi");
}

fn main() {
dbg!(program());

test();
}
3 changes: 1 addition & 2 deletions src/base.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use core::fmt::{Formatter, Pointer, Result};
use core::fmt::{Debug, Formatter, Pointer, Result};
use core::ptr::NonNull;
use std::fmt::Debug;
use windows::core::PCWSTR;
use windows::Win32::System::LibraryLoader::GetModuleHandleW;

Expand Down
1 change: 1 addition & 0 deletions src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use windows::Win32::System::SystemServices::IMAGE_DOS_HEADER;

static PROGRAM: LazyLock<Program> = LazyLock::new(Program::init);

#[inline]
pub fn program() -> &'static Program {
&PROGRAM
}
Expand Down
6 changes: 3 additions & 3 deletions src/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use rayon::slice::ParallelSlice;

#[derive(Debug)]
pub struct Section {
pub(crate) name: &'static str,
pub(crate) base: Base,
pub(crate) len: usize,
name: &'static str,
base: Base,
len: usize,
}

impl Section {
Expand Down

0 comments on commit b595cee

Please sign in to comment.