Fix two instances of OBJECT_VAL called on non-object
This commit is contained in:
parent
158f660695
commit
ea55152aac
@ -69,7 +69,7 @@ KRK_Method(set,__contains__) {
|
||||
|
||||
KRK_Method(set,__repr__) {
|
||||
METHOD_TAKES_NONE();
|
||||
if (((KrkObj*)self)->flags & KRK_OBJ_FLAGS_IN_REPR) return OBJECT_VAL("{...}");
|
||||
if (((KrkObj*)self)->flags & KRK_OBJ_FLAGS_IN_REPR) return OBJECT_VAL(S("{...}"));
|
||||
if (!self->entries.capacity) return OBJECT_VAL(S("set()"));
|
||||
((KrkObj*)self)->flags |= KRK_OBJ_FLAGS_IN_REPR;
|
||||
struct StringBuilder sb = {0};
|
||||
|
@ -118,7 +118,7 @@ KRK_Method(slice,__init__) {
|
||||
|
||||
KRK_Method(slice,__repr__) {
|
||||
METHOD_TAKES_NONE();
|
||||
if (((KrkObj*)self)->flags & KRK_OBJ_FLAGS_IN_REPR) return OBJECT_VAL("slice(...)");
|
||||
if (((KrkObj*)self)->flags & KRK_OBJ_FLAGS_IN_REPR) return OBJECT_VAL(S("slice(...)"));
|
||||
((KrkObj*)self)->flags |= KRK_OBJ_FLAGS_IN_REPR;
|
||||
struct StringBuilder sb = {0};
|
||||
pushStringBuilderStr(&sb,"slice(",6);
|
||||
|
Loading…
Reference in New Issue
Block a user