From 3af7d61d3ebda03d8c2eedc0f9fe6af1c6edcf67 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 12 Jun 2022 12:51:06 -0500 Subject: [PATCH] Update gtk example. --- ffitest/gtk.janet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffitest/gtk.janet b/ffitest/gtk.janet index 529b7921..a2e86d53 100644 --- a/ffitest/gtk.janet +++ b/ffitest/gtk.janet @@ -5,7 +5,7 @@ (defn ffi-context "Load a dynamic library and set it as the context for following declarations" [location] - (setdyn :raw-native (ffi/native location))) + (setdyn :ffi-context (ffi/native location))) (defmacro defnative "Declare a native binding" @@ -16,7 +16,7 @@ (def $sig (symbol name "-signature-")) (def $pointer (symbol name "-raw-pointer-")) ~(upscope - (def ,$pointer :private (as-macro ,assert (,ffi/lookup (,dyn :raw-native) ,raw-symbol))) + (def ,$pointer :private (as-macro ,assert (,ffi/lookup (,dyn :ffi-context) ,raw-symbol))) (def ,$sig :private (,ffi/signature :default ,ret-type ,;signature-args)) (defn ,name [,;defn-args] (,ffi/call ,$pointer ,$sig ,;defn-args))))