From ea55152aacb2a3114de4cc75f349dcc9bd73c0e9 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Sat, 2 Mar 2024 12:37:14 +0900 Subject: [PATCH] Fix two instances of OBJECT_VAL called on non-object --- src/obj_set.c | 2 +- src/obj_slice.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/obj_set.c b/src/obj_set.c index b54f76f..c5d3b83 100644 --- a/src/obj_set.c +++ b/src/obj_set.c @@ -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}; diff --git a/src/obj_slice.c b/src/obj_slice.c index c5cebb5..6456fb5 100644 --- a/src/obj_slice.c +++ b/src/obj_slice.c @@ -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);