From f054b9975d39931144dd78c7ac79c41ac5e2f522 Mon Sep 17 00:00:00 2001 From: "Hamada S. Badr" Date: Thu, 31 Mar 2022 14:50:22 -0400 Subject: [PATCH] Fix `torch_imports.h` --- inst/include/torch_imports.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inst/include/torch_imports.h b/inst/include/torch_imports.h index 0aeaf24e29..ac5f1d981d 100644 --- a/inst/include/torch_imports.h +++ b/inst/include/torch_imports.h @@ -223,9 +223,9 @@ XPtrTorchOptionalIntArrayRef from_sexp_optional_int_array_ref(SEXP x, } void* fixme_new_string(const char* x, int size) { - static void* (*fn)(const char*) = NULL; + static void* (*fn)(const char*, int) = NULL; if (fn == NULL) { - fn = (void* (*)(const char*))R_GetCCallable("torch", "fixme_new_string"); + fn = (void* (*)(const char*, int))R_GetCCallable("torch", "fixme_new_string"); } return fn(x, size); } @@ -238,4 +238,4 @@ void* fixme_new_dimname(const char* x) { return fn(x); } -#endif // TORCH_IMPORTS \ No newline at end of file +#endif // TORCH_IMPORTS