summaryrefslogtreecommitdiffstats
path: root/src/scripting/bindings
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2023-02-24 19:25:04 (EST)
committer P. J. McDermott <pj@pehjota.net>2023-02-24 19:25:04 (EST)
commit6333a37011368ce65b5804b0c698257559a6e41a (patch)
tree1be1484a3a9448b9a2c74008b071a994e17d293a /src/scripting/bindings
parent1362c0c581980b0cd5d9540e91ba5458910653f7 (diff)
downloadoverworld-rpg-6333a37011368ce65b5804b0c698257559a6e41a.zip
overworld-rpg-6333a37011368ce65b5804b0c698257559a6e41a.tar.gz
overworld-rpg-6333a37011368ce65b5804b0c698257559a6e41a.tar.bz2
bindings: Make variables not static global
Diffstat (limited to 'src/scripting/bindings')
-rw-r--r--src/scripting/bindings/viewport.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scripting/bindings/viewport.c b/src/scripting/bindings/viewport.c
index 8fcc041..7e23d7d 100644
--- a/src/scripting/bindings/viewport.c
+++ b/src/scripting/bindings/viewport.c
@@ -21,8 +21,6 @@
#include "../ffi.h"
#include "../bindings.h"
-static struct ffi_namespace *ns;
-
static void
binding_set_size(struct ffi_function *fn)
{
@@ -36,8 +34,10 @@ binding_set_size(struct ffi_function *fn)
}
void
-bindings_viewport_init(void)
+bindings_viewport_init(struct ffi_namespace *top_ns)
{
+ struct ffi_namespace *ns;
+
ns = ffi_add_namespace(top_ns, "viewport");
ffi_add_function(ns, "set_size", binding_set_size);
}