From 74f45757783634677b52880a496f33591513546e Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Tue, 18 Jul 2023 23:04:47 +0800 Subject: [PATCH] ... --- dylib/src/test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dylib/src/test.c b/dylib/src/test.c index 39614781..d02ed610 100644 --- a/dylib/src/test.c +++ b/dylib/src/test.c @@ -13,9 +13,7 @@ const char* pkpy_module__init__(pkpy_vm* vm, const char* version){ pkpy_push_function(vm, "hello()", hello); pkpy_push_module(vm, "test"); pkpy_setattr(vm, pkpy_name("hello")); - if(pkpy_check_error(vm)){ - pkpy_clear_error(vm, NULL); - return NULL; - } + // check if initialization failed + if(pkpy_clear_error(vm, NULL)) return NULL; return "test"; } \ No newline at end of file