-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support raw mode for posix in native image (#186)
The issue with `Expected Object but got Word` when compiling the native image comes from the fact that the kotlin compiler insert null checks if the used types are not nullable. For example, if we declare tcgetattr as ```kotlin @cfunction("tcgetattr") external fun tcgetattr(fd: Int, termios: termios): Int ``` Every call to it will be compiled as ```kotlin Intrinsics.checkNotNull(termios); tcgetattr(..., termios); ``` It is possible to disable those checks with the following compiler parameters: -Xno-param-assertions, -Xno-call-assertions,-Xno-receiver-assertions. But in this case, it is enough to simply mark the termios parameter as nullable.
- Loading branch information
Showing
2 changed files
with
67 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters