Skip to content

Commit

Permalink
parity between ALLOCATE and FINALIZE (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel authored Apr 28, 2021
1 parent 7d440a3 commit 9b81aec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cli/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ typedef struct

#define METHOD(signature, fn) { false, 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.
static ModuleRegistry modules[] =
Expand All @@ -121,8 +122,8 @@ static ModuleRegistry modules[] =
STATIC_METHOD("list_(_,_)", directoryList)
END_CLASS
CLASS(File)
STATIC_METHOD("<allocate>", fileAllocate)
FINALIZER(fileFinalize)
ALLOCATE(fileAllocate)
FINALIZE(fileFinalize)
STATIC_METHOD("delete_(_,_)", fileDelete)
STATIC_METHOD("open_(_,_,_)", fileOpen)
STATIC_METHOD("realPath_(_,_)", fileRealPath)
Expand Down

0 comments on commit 9b81aec

Please sign in to comment.