Skip to content

Commit

Permalink
Fixes for review
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrameos committed Oct 17, 2022
1 parent 2918afe commit e8f6a09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 0 additions & 6 deletions native/common/jp_exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,6 @@ PyObject *tb_create(
PyFrameObject *pframe = PyFrame_New(state, (PyCodeObject*) code.get(), dict, NULL);
JPPyObject frame = JPPyObject::accept((PyObject*)pframe);

// Swap the back pointer
//PyObject* old = frame->f_back;
//frame->f_back = last_traceback->tb_frame;
//Py_XDECREF(old);
//Py_XINCREF(last_traceback->tb_frame);

// If we don't get the frame object there is no point
if (frame.get() == NULL)
return NULL;
Expand Down
4 changes: 1 addition & 3 deletions native/python/pyjp_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ extern "C"
{
#endif

extern PyObject * _PyObject_GC_Malloc(size_t basicsize);

/**
* Allocate a new Python object with a slot for Java.
*
Expand All @@ -49,7 +47,7 @@ PyObject* PyJPValue_alloc(PyTypeObject* type, Py_ssize_t nitems )
if (PyType_IS_GC(type))
{
// Horrible kludge because python lacks an API for allocating a GC type with extra memory
// The privor method _PyObject_GC_Alloc is no longer visible, so we are forced to allocate
// The private method _PyObject_GC_Alloc is no longer visible, so we are forced to allocate
// a different type with the extra memory and then hot swap the type to the real one.
PyTypeObject type2;
type2.tp_basicsize = size;
Expand Down

0 comments on commit e8f6a09

Please sign in to comment.