From df5f5b4e932b31a399377e21b21111b1cb9a96fc Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Thu, 11 Apr 2024 11:28:48 +0800 Subject: [PATCH] some fix --- include/pocketpy/obj.h | 1 - include/pocketpy/vm.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/pocketpy/obj.h b/include/pocketpy/obj.h index 4f271941..83ba0730 100644 --- a/include/pocketpy/obj.h +++ b/include/pocketpy/obj.h @@ -151,7 +151,6 @@ inline bool is_type(PyObject* obj, Type type) { #endif switch(type.index){ case kTpIntIndex: return is_int(obj); - case kTpFloatIndex: return is_float(obj); default: return !is_tagged(obj) && obj->type == type; } } diff --git a/include/pocketpy/vm.h b/include/pocketpy/vm.h index f6d9808b..06ba2e36 100644 --- a/include/pocketpy/vm.h +++ b/include/pocketpy/vm.h @@ -367,8 +367,7 @@ public: Type _tp(PyObject* obj){ if(!is_tagged(obj)) return obj->type; - if(is_int(obj)) return tp_int; - return tp_float; + return tp_int; } PyObject* _t(PyObject* obj){