Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do "current process" loading in a portable way.
  • Loading branch information
jnthn committed Oct 12, 2013
1 parent ddb9cd4 commit a37b601
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java
Expand Up @@ -22,7 +22,9 @@ public static long build(SixModelObject target, String libname, String symbol, S
try {
/* Load the library and locate the symbol. */
/* TODO: Error handling! */
NativeLibrary library = NativeLibrary.getInstance(libname);
NativeLibrary library = libname == null || libname.equals("")
? NativeLibrary.getProcess()
: NativeLibrary.getInstance(libname);
call.entry_point = library.getFunction(symbol);

/* TODO: Set the calling convention. */
Expand Down

0 comments on commit a37b601

Please sign in to comment.