Turn Module into an Obj.

This commit is contained in:
Bob Nystrom
2015-01-27 07:11:45 -08:00
parent 83ad9abd73
commit 1101823666
6 changed files with 70 additions and 44 deletions
+3 -3
View File
@@ -198,7 +198,7 @@ struct WrenVM
// TODO: Temp.
// The main module.
Module main;
ObjModule* main;
// Memory management data:
@@ -280,14 +280,14 @@ void* wrenReallocate(WrenVM* vm, void* memory, size_t oldSize, size_t newSize);
// Does not check to see if a variable with that name is already declared or
// defined. Returns the symbol for the new variable or -2 if there are too many
// variables defined.
int wrenDeclareVariable(WrenVM* vm, Module* module, const char* name,
int wrenDeclareVariable(WrenVM* vm, ObjModule* module, const char* name,
size_t length);
// Adds a new top-level variable named [name] to [module].
//
// Returns the symbol for the new variable, -1 if a variable with the given name
// is already defined, or -2 if there are too many variables defined.
int wrenDefineVariable(WrenVM* vm, Module* module, const char* name,
int wrenDefineVariable(WrenVM* vm, ObjModule* module, const char* name,
size_t length, Value value);
// Sets the current Compiler being run to [compiler].