Skip to content

Commit

Permalink
steal ref
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Jun 28, 2023
1 parent d6f1e2b commit f10d41f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/bad_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,17 @@ Functions stealing references
* ``PyContextVar_Reset()``: *token*
* ``PyContext_Exit()``: *ctx*
* ``PyErr_Restore()``: *type*, *value*, *traceback*
* ``PyErr_SetExcInfo(exc_type, exc_value, exc_tb)``: the 3 arguments
* ``PyErr_SetRaisedException(exc)``: *exc*
* ``PyException_SetCause(exc, cause)``: *cause*
* ``PyException_SetContext(exc, ctx)``: *ctx*
* ``PyList_SET_ITEM(op, index, value)``: *value*
* ``PyList_SetItem(op, i, newitem)``: *newitem*
* ``PyModule_AddObject()``: *o* on success, no change on error!
* ``PyModule_AddObject()``: use ``PyModule_AddObjectRef()``
* ``PySet_Discard()``: *key*, no effect if key not found
* ``PyString_ConcatAndDel()``: *newpart*
* ``PyStructSequence_SET_ITEM(op, index, value)``: *value*
* ``PyStructSequence_SetItem(op, index, value)``: *value*
* ``PyTuple_SET_ITEM(op, index, value)``: *value*
* ``PyTuple_SetItem(op, i, newitem)``: *newitem*
* ``Py_DECREF(op)``: *op*
Expand Down

0 comments on commit f10d41f

Please sign in to comment.