Use stdbool.h and bool for booleans.

This commit is contained in:
Bob Nystrom
2013-12-14 23:41:23 -08:00
parent f5e4f95069
commit 9e67cd3220
7 changed files with 108 additions and 105 deletions
+4 -4
View File
@@ -945,14 +945,14 @@ Value interpret(WrenVM* vm, Value function)
Value obj = POP();
ObjClass* actual = wrenGetClass(vm, obj);
int isInstance = 0;
bool isInstance = false;
// Walk the superclass chain looking for the class.
while (actual != NULL)
{
if (actual == expected)
{
isInstance = 1;
isInstance = true;
break;
}
actual = actual->superclass;
@@ -1035,7 +1035,7 @@ Value interpret(WrenVM* vm, Value function)
// Capture upvalues.
for (int i = 0; i < prototype->numUpvalues; i++)
{
int isLocal = READ_ARG();
bool isLocal = READ_ARG();
int index = READ_ARG();
if (isLocal)
{
@@ -1056,7 +1056,7 @@ Value interpret(WrenVM* vm, Value function)
CASE_CODE(CLASS):
CASE_CODE(SUBCLASS):
{
int isSubclass = instruction == CODE_SUBCLASS;
bool isSubclass = instruction == CODE_SUBCLASS;
int numFields = READ_ARG();
ObjClass* superclass;