parity between ALLOCATE and FINALIZE (#82)

This commit is contained in:
Josh Goebel
2021-04-28 14:44:36 -07:00
committed by GitHub
parent 7d440a32de
commit 9b81aec7e4
+4 -3
View File
@@ -111,7 +111,8 @@ typedef struct
#define METHOD(signature, fn) { false, signature, fn }, #define METHOD(signature, fn) { false, signature, fn },
#define STATIC_METHOD(signature, fn) { true, signature, fn }, #define STATIC_METHOD(signature, fn) { true, signature, fn },
#define FINALIZER(fn) { true, "<finalize>", (WrenForeignMethodFn)fn }, #define ALLOCATE(fn) { true, "<allocate>", (WrenForeignMethodFn)fn },
#define FINALIZE(fn) { true, "<finalize>", (WrenForeignMethodFn)fn },
// The array of built-in modules. // The array of built-in modules.
static ModuleRegistry modules[] = static ModuleRegistry modules[] =
@@ -121,8 +122,8 @@ static ModuleRegistry modules[] =
STATIC_METHOD("list_(_,_)", directoryList) STATIC_METHOD("list_(_,_)", directoryList)
END_CLASS END_CLASS
CLASS(File) CLASS(File)
STATIC_METHOD("<allocate>", fileAllocate) ALLOCATE(fileAllocate)
FINALIZER(fileFinalize) FINALIZE(fileFinalize)
STATIC_METHOD("delete_(_,_)", fileDelete) STATIC_METHOD("delete_(_,_)", fileDelete)
STATIC_METHOD("open_(_,_,_)", fileOpen) STATIC_METHOD("open_(_,_,_)", fileOpen)
STATIC_METHOD("realPath_(_,_)", fileRealPath) STATIC_METHOD("realPath_(_,_)", fileRealPath)