Lines Matching defs:callback

446 /* A traversal callback for subtract_refs. */
484 /* A traversal callback for move_unreachable. */
711 /* A traversal callback for move_legacy_finalizer_reachable. */
743 * callback, invoke it if necessary. Note that it's possible for such
766 * also has a callback, move it into `wrcb_to_call` if the callback
768 * all weakrefs to unreachable objects are cleared, lest the callback
781 * allow its callback to execute inside delete_garbage(), it
787 * reference cycle. If we don't clear the weakref, the callback
809 * the callback pointer intact. Obscure: it also
816 /* no callback */
821 * `wr`, which has a callback. Should the callback be invoked? If wr
827 * referent if they want a guarantee that the wr callback will get
830 * 2. It may be catastrophic to call it. If the callback is also in
833 * callback. Then the callback could resurrect insane objects.
835 * Since the callback is never needed and may be unsafe in this case,
837 * already called _PyWeakref_ClearRef(wr), its callback will never
840 * OTOH, if wr isn't part of CT, we should invoke the callback: the
842 * case, its callback can't be CT either -- wr acted as an external
843 * root to this generation, and therefore its callback did too. So
844 * nothing in CT is reachable from the callback either, so it's hard
873 PyObject *callback;
879 callback = wr->wr_callback;
880 _PyObject_ASSERT(op, callback != NULL);
883 temp = PyObject_CallOneArg(callback, (PyObject *)wr);
885 PyErr_WriteUnraisable(callback);
896 * The callback removes this key->weakref mapping from the