check-new-ref ( ref -- ref ) (original) (raw)
Inputs
ref | a python object |
---|
Outputs
ref | a python object |
---|
Word description
Adds reference counting to the returned python object which is assumed to be a new reference. An error is thrown if the object is f. This word is used to wrap Python functions that return new references.
Definition
: check-new-ref ( ref -- ref ) &Py_DecRef (check-ref) ;