浏览代码

Update obj.h

blueloveTH 2 年之前
父节点
当前提交
f7eecaa165
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/pocketpy/obj.h

+ 1 - 1
include/pocketpy/obj.h

@@ -149,7 +149,7 @@ inline bool is_type(PyObject* obj, Type type) {
 #if PK_DEBUG_EXTRA_CHECK
     if(obj == nullptr) throw std::runtime_error("is_type() called with nullptr");
 #endif
-    return is_tagged(obj) ? type.index == kTpIntIndex : obj->type == type;
+    return is_small_int(obj) ? type.index == kTpIntIndex : obj->type == type;
 }
 
 [[deprecated("use is_type() instead")]]