| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| // Keep in sync with _common_constants in opcode.py | ||
| assert(oparg < NUM_COMMON_CONSTANTS); | ||
| value = PyStackRef_FromPyObjectNew(tstate->interp->common_consts[oparg]); | ||
| value = PyStackRef_DUP(tstate->interp->common_consts[oparg]); |
There was a problem hiding this comment.
This needs to check the tag.
Could you add PyStackRef_DupImmortal(ref) which would return its argument unchanged and assert that the referenced object is immortal, otherwise it defeats the point of changing PyObject * to _PyStackRef here
Sorry, something went wrong.
| if (opcode == LOAD_COMMON_CONSTANT) { | ||
| assert(oparg < NUM_COMMON_CONSTANTS); | ||
| return Py_NewRef(_PyInterpreterState_GET()->common_consts[oparg]); | ||
| return Py_NewRef(PyStackRef_AsPyObjectBorrow( |
There was a problem hiding this comment.
| return Py_NewRef(PyStackRef_AsPyObjectBorrow( | |
| return PyStackRef_AsPyObjectBorrow( |
These objects are immortal, you can borrow references to them.
Sorry, something went wrong.
|
Thanks for reviewing :') |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good. Thanks for doing this
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
gc.is_tracked(all/any) True -> False