mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
Update obj.h
This commit is contained in:
parent
11def613b6
commit
f7eecaa165
@ -149,7 +149,7 @@ inline bool is_type(PyObject* obj, Type type) {
|
|||||||
#if PK_DEBUG_EXTRA_CHECK
|
#if PK_DEBUG_EXTRA_CHECK
|
||||||
if(obj == nullptr) throw std::runtime_error("is_type() called with nullptr");
|
if(obj == nullptr) throw std::runtime_error("is_type() called with nullptr");
|
||||||
#endif
|
#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")]]
|
[[deprecated("use is_type() instead")]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user