Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
marcprux committed May 22, 2024
1 parent f5ea1f8 commit ce797c3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ import Darwin
#else
import SkipFFI
let Darwin = BionicDarwin()
#endif

// Full-qualified Module.fname() will call through SkipFFI to the C interface
Darwin.abs(-12) // 12
Darwin.free(Darwin.malloc(8))


// MARK: Implementation of C interface

func BionicDarwin() -> BionicDarwin {
com.sun.jna.Native.load("c", (BionicDarwin.self as kotlin.reflect.KClass).java)
Expand All @@ -42,6 +34,11 @@ protocol BionicDarwin : com.sun.jna.Library {

func getenv(_ key: String) -> String?
}
#endif

// Fully-qualified Module.fname() will call through SkipFFI to the C interface
Darwin.abs(-12) // 12
Darwin.free(Darwin.malloc(8))

```

Expand Down

0 comments on commit ce797c3

Please sign in to comment.