USING: alien.c-types alien.data kernel python.ffi vocabs.loader words ; IN: python.errors : (check-ref) ( ref -- ref ) [ get-error throw-error f ] unless* ; : check-new-ref ( ref -- ref ) &Py_DecRef (check-ref) ; : check-borrowed-ref ( ref -- ref ) dup Py_IncRef &Py_DecRef (check-ref) ; : check-zero ( code -- ) 0 = [ get-error throw-error ] unless ; : unsteal-ref ( ref -- ref ) dup Py_IncRef ;