-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add j19 implementation, improve reliability.
- Loading branch information
1 parent
1396cba
commit 108f707
Showing
9 changed files
with
112 additions
and
121 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
package fr.hammons.slinc | ||
|
||
private[slinc] trait Lookup: | ||
import java.nio.file.Path | ||
import java.nio.file.Paths | ||
|
||
trait Lookup(libraryLocation: LibraryLocation): | ||
def lookup(name: String): Object | ||
|
||
def lookupError(name: String): Error = libraryLocation match | ||
case LibraryLocation.Standardard => Error(s"Failed to load symbol $name from the standard library.") | ||
case LibraryLocation.Resource(location) => | ||
Error(s"Failed to load symbol $name from resource $location. This could be caused by resource collision. Is the resource name unique enough?") | ||
case LibraryLocation.Local(location) => | ||
val absPath = Paths.get(location).nn.toAbsolutePath.nn | ||
Error(s"Failed to load symbol $name from local path $absPath") | ||
case LibraryLocation.Path(libName) => | ||
Error(s"Failed to load symbol $name from library $libName") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifdef _WIN32 | ||
# ifdef WIN_EXPORT | ||
# define EXPORTED __declspec( dllexport ) | ||
# else | ||
# define EXPORTED __declspec( dllimport ) | ||
# endif | ||
#else | ||
# define EXPORTED | ||
#endif | ||
|
||
EXPORTED int identity_int(int i) { | ||
return i; | ||
} |
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
This file was deleted.
Oops, something went wrong.
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