general cleanups. Removed lots of unused code and redundant error checks

This commit is contained in:
Francesco Cozzuto
2022-08-24 16:46:32 +02:00
parent 71e8a9e4cb
commit cd74dda4a9
29 changed files with 333 additions and 813 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ static Object *copy(Object *self, Heap *heap, Error *err);
static TypeObject t_none = {
.base = (Object) { .type = &t_type, .flags = Object_STATIC },
.name = "none",
.size = sizeof (Object),
.size = sizeof(Object),
.hash = hash,
.copy = copy,
.print = print,
@@ -59,7 +59,7 @@ TypeObject *Object_GetNoneType()
_Bool Object_IsNone(Object *obj)
{
return obj == &the_none_object;
return Object_GetType(obj) == Object_GetNoneType();
}
static int hash(Object *self)