From be83b08a0be6b908f3cc6606ffa41872052171e9 Mon Sep 17 00:00:00 2001 From: nishi Date: Sat, 27 Apr 2024 04:56:57 +0000 Subject: [PATCH] binmod works git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@75 0f02c867-ac3d-714e-8a88-971ba1f6efcf --- Serenade/binmodule.c | 4 ++-- Serenade/binmodule.h | 2 +- Serenade/ffi_binding.c | 2 +- Serenade/ffi_binding.h | 2 +- Serenade/interpreter.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Serenade/binmodule.c b/Serenade/binmodule.c index f388de5..a638323 100644 --- a/Serenade/binmodule.c +++ b/Serenade/binmodule.c @@ -48,7 +48,7 @@ struct sn_generic* binmodule_load_handler(struct sn_interpreter* sn, int argc, s gen->type = SN_TYPE_DOUBLE; gen->number = -1; void* lib = NULL; - char* name = sn_strdup("module"); + char* name = sn_strdup("binmodule"); if((argc == 3 || argc == 2) && args[1]->type == SN_TYPE_STRING) { if((argc == 3 ? (args[2]->type == SN_TYPE_STRING) : true)) { char* path = malloc(args[1]->string_length + 1); @@ -92,7 +92,7 @@ struct sn_generic* binmodule_load_handler(struct sn_interpreter* sn, int argc, s return gen; } -void binmodule_init(struct sn_interpreter* sn) { +void sn_binmodule_init(struct sn_interpreter* sn) { struct sn_generic* gen = malloc(sizeof(struct sn_generic)); gen->type = SN_TYPE_DOUBLE; gen->number = 1; diff --git a/Serenade/binmodule.h b/Serenade/binmodule.h index 49b9ebc..4485e53 100644 --- a/Serenade/binmodule.h +++ b/Serenade/binmodule.h @@ -33,7 +33,7 @@ #include "interpreter.h" -void binmodule_init(struct sn_interpreter* sn); +void sn_binmodule_init(struct sn_interpreter* sn); struct sn_binmodule_config { struct sn_interpreter* interpreter; diff --git a/Serenade/ffi_binding.c b/Serenade/ffi_binding.c index 9ba60e0..4a093bd 100644 --- a/Serenade/ffi_binding.c +++ b/Serenade/ffi_binding.c @@ -227,7 +227,7 @@ struct sn_generic* ffi_load_handler(struct sn_interpreter* sn, int args, struct return gen; } -void ffi_init(struct sn_interpreter* sn) { +void sn_ffi_init(struct sn_interpreter* sn) { struct sn_generic* gen = malloc(sizeof(struct sn_generic)); gen->type = SN_TYPE_DOUBLE; gen->number = 1; diff --git a/Serenade/ffi_binding.h b/Serenade/ffi_binding.h index 3c47c67..a5c3833 100644 --- a/Serenade/ffi_binding.h +++ b/Serenade/ffi_binding.h @@ -33,6 +33,6 @@ #include "interpreter.h" -void ffi_init(struct sn_interpreter* sn); +void sn_ffi_init(struct sn_interpreter* sn); #endif diff --git a/Serenade/interpreter.c b/Serenade/interpreter.c index 1b22c00..58eb16a 100644 --- a/Serenade/interpreter.c +++ b/Serenade/interpreter.c @@ -159,10 +159,10 @@ void sn_stdlib_init(struct sn_interpreter* sn) { void sn_module_init(struct sn_interpreter* sn) { #ifdef HAS_FFI_SUPPORT - ffi_init(sn); + sn_ffi_init(sn); #endif #ifdef HAS_BINMODULE_SUPPORT - binmodule_init(sn); + sn_binmodule_init(sn); #endif } -- 2.43.0