mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
fix new_object<>
This commit is contained in:
parent
17d0c87c96
commit
5a6ede01d1
@ -445,8 +445,8 @@ public:
|
|||||||
|
|
||||||
template<typename T, typename ...Args>
|
template<typename T, typename ...Args>
|
||||||
PyVar new_object(Type type, Args&&... args){
|
PyVar new_object(Type type, Args&&... args){
|
||||||
if constexpr(is_sso_v<T>) return PyVar(type, T(std::forward<Args>(args)...));
|
static_assert(!is_sso_v<T>);
|
||||||
else return heap.gcnew<T>(type, std::forward<Args>(args)...);
|
return heap.gcnew<T>(type, std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user