diff --git a/src/deemon/compiler/asm/assembler.c b/src/deemon/compiler/asm/assembler.c index 81c51499c..1217346f0 100644 --- a/src/deemon/compiler/asm/assembler.c +++ b/src/deemon/compiler/asm/assembler.c @@ -1956,7 +1956,7 @@ relint_compare_eq(DeeRelIntObject *self, DeeRelIntObject *other) { PRIVATE WUNUSED NONNULL((1, 2)) int DCALL relint_trycompare_eq(DeeRelIntObject *self, DeeRelIntObject *other) { - if (DeeObject_AssertTypeExact(other, &DeeRelInt_Type)) + if (!DeeObject_InstanceOfExact(other, &DeeRelInt_Type)) return -1; return (self->ri_sym == other->ri_sym && self->ri_add == other->ri_add && @@ -1977,7 +1977,7 @@ INTERN DeeTypeObject DeeRelInt_Type = { OBJECT_HEAD_INIT(&DeeType_Type), /* .tp_name = */ "_RelInt", /* .tp_doc = */ NULL, - /* .tp_flags = */ TP_FNORMAL|TP_FFINAL, + /* .tp_flags = */ TP_FNORMAL | TP_FFINAL, /* .tp_weakrefs = */ 0, /* .tp_features = */ TF_NONE, /* .tp_base = */ &DeeObject_Type, diff --git a/src/deemon/objects/attribute.c b/src/deemon/objects/attribute.c index 67d3919ed..a5feb2408 100644 --- a/src/deemon/objects/attribute.c +++ b/src/deemon/objects/attribute.c @@ -1079,7 +1079,7 @@ enumattr_longjmp(DeeObject *__restrict declarator, } else { new_attribute->a_info.a_doc = attr_doc; } - Dee_XIncref(declarator); + Dee_Incref(declarator); Dee_XIncref(attr_type); DeeObject_Init(new_attribute, &DeeAttribute_Type); diff --git a/src/deemon/objects/seq_functions.c b/src/deemon/objects/seq_functions.c index 47747b528..f67faa563 100644 --- a/src/deemon/objects/seq_functions.c +++ b/src/deemon/objects/seq_functions.c @@ -2085,8 +2085,11 @@ DeeSeq_EqVS(DeeObject *const *lhsv, size_t lhsc, } else { DREF DeeObject *rhs_iter; rhs_iter = DeeObject_Iter(rhs); - if unlikely(!rhs_iter) + if unlikely(!rhs_iter) { + if (DeeError_Catch(&DeeError_NotImplemented)) + return 0; return -1; + } result = DeeSeq_EqVI(lhsv, lhsc, rhs_iter); Dee_Decref(rhs_iter); } @@ -2183,8 +2186,11 @@ DeeSeq_EqFS(DeeObject *lhs, size_t lhsc, DeeObject *rhs) { } else { DREF DeeObject *rhs_iter; rhs_iter = DeeObject_Iter(rhs); - if unlikely(!rhs_iter) + if unlikely(!rhs_iter) { + if (DeeError_Catch(&DeeError_NotImplemented)) + return 0; return -1; + } result = DeeSeq_EqFI(lhs, lhsc, rhs_iter); Dee_Decref(rhs_iter); } @@ -2300,8 +2306,11 @@ DeeSeq_EqIS(DeeObject *lhs, DeeObject *rhs) { } else { DREF DeeObject *rhs_iter; rhs_iter = DeeObject_Iter(rhs); - if unlikely(!rhs_iter) + if unlikely(!rhs_iter) { + if (DeeError_Catch(&DeeError_NotImplemented)) + return 0; return -1; + } result = DeeSeq_EqII(lhs, rhs_iter); Dee_Decref(rhs_iter); } diff --git a/src/deemon/runtime/operator.c b/src/deemon/runtime/operator.c index 192f9cac7..a7594f8a3 100644 --- a/src/deemon/runtime/operator.c +++ b/src/deemon/runtime/operator.c @@ -1558,12 +1558,9 @@ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultStrWithPrint, (DeeObject *REST Dee_ssize_t print_error; struct unicode_printer printer = UNICODE_PRINTER_INIT; LOAD_TP_SELF; - ASSERT(tp_self->tp_cast.tp_print); - ASSERT(tp_self->tp_cast.tp_print != &DeeObject_DefaultPrintWithStr); - print_error = DeeType_INVOKE_PRINTREPR_NODEFAULT(tp_self, self, &unicode_printer_print, &printer); ASSERT(tp_self->tp_cast.tp_print && tp_self->tp_cast.tp_print != &DeeObject_DefaultPrintWithStr); - print_error = DeeType_INVOKE_PRINT(tp_self, self, &unicode_printer_print, &printer); + print_error = DeeType_INVOKE_PRINT_NODEFAULT(tp_self, self, &unicode_printer_print, &printer); if unlikely(print_error < 0) goto err; return unicode_printer_pack(&printer);