Skip to content

Commit 5125051

Browse files
committed
FIX: Import of native extension (library) on Windows
resolves: Oldes/Rebol-issues#2455
1 parent 30b179f commit 5125051

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/f-extension.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ x*/ int Do_Callback(REBSER *obj, u32 name, RXIARG *args, RXIARG *result)
312312
**
313313
***********************************************************************/
314314
{
315-
REBCHR *name;
315+
REBSER* path;
316316
void *dll;
317317
REBCNT error;
318318
REBYTE *code;
@@ -329,10 +329,10 @@ x*/ int Do_Callback(REBSER *obj, u32 name, RXIARG *args, RXIARG *result)
329329

330330
if (!IS_FILE(val)) Trap_Arg(val);
331331

332-
name = Val_Str_To_OS(val);
332+
path = Value_To_OS_Path(val, FALSE);
333333

334334
// Try to load the DLL file:
335-
if (!(dll = OS_OPEN_LIBRARY(name, &error))) {
335+
if (!(dll = OS_OPEN_LIBRARY(SERIES_DATA(path), &error))) {
336336
//printf("error: %i\n", error);
337337
Trap1(RE_NO_EXTENSION, val);
338338
}

0 commit comments

Comments
 (0)