mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 20:40:18 +00:00
fix a bug
This commit is contained in:
parent
c157d85de6
commit
51170e4a47
@ -54,7 +54,7 @@ struct ManagedHeap{
|
||||
PyVar _new(Type type, Args&&... args){
|
||||
using __T = std::decay_t<T>;
|
||||
static_assert(!is_sso_v<__T>);
|
||||
PyObject* p = new(pool128_alloc<__T>()) PyObject(type);
|
||||
PyObject* p = new(pool128_alloc(py_sizeof<__T>)) PyObject(type);
|
||||
p->placement_new<__T>(std::forward<Args>(args)...);
|
||||
_no_gc.push_back(p);
|
||||
return PyVar(type, p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user