Lines Matching refs:proxy
286 PyWeakReference *ref, *proxy; in weakref___new__() local
298 get_basic_refs(*list, &ref, &proxy); in weakref___new__()
321 get_basic_refs(*list, &ref, &proxy); in weakref___new__()
322 prev = (proxy == NULL) ? ref : proxy; in weakref___new__()
394 proxy_checkref(PyWeakReference *proxy) in proxy_checkref() argument
396 if (PyWeakref_GET_OBJECT(proxy) == Py_None) { in proxy_checkref()
425 method(PyObject *proxy) { \
426 UNWRAP(proxy); \
427 return generic(proxy); \
443 method(PyObject *proxy, PyObject *v, PyObject *w) { \
444 UNWRAP(proxy); \
448 return generic(proxy, v, w); \
453 method(PyObject *proxy) { \
454 UNWRAP(proxy); \
455 return PyObject_CallMethod(proxy, special, ""); \
466 proxy_repr(PyWeakReference *proxy) in WRAP_BINARY()
470 "<weakproxy at %p to %.100s at %p>", proxy, in WRAP_BINARY()
471 Py_TYPE(PyWeakref_GET_OBJECT(proxy))->tp_name, in WRAP_BINARY()
472 PyWeakref_GET_OBJECT(proxy)); in WRAP_BINARY()
478 proxy_setattr(PyWeakReference *proxy, PyObject *name, PyObject *value) in proxy_setattr() argument
480 if (!proxy_checkref(proxy)) in proxy_setattr()
482 return PyObject_SetAttr(PyWeakref_GET_OBJECT(proxy), name, value); in proxy_setattr()
486 proxy_compare(PyObject *proxy, PyObject *v) in proxy_compare() argument
488 UNWRAP_I(proxy); in proxy_compare()
490 return PyObject_Compare(proxy, v); in proxy_compare()
531 proxy_nonzero(PyWeakReference *proxy) in WRAP_BINARY()
533 PyObject *o = PyWeakref_GET_OBJECT(proxy); in WRAP_BINARY()
534 if (!proxy_checkref(proxy)) in WRAP_BINARY()
551 proxy_slice(PyWeakReference *proxy, Py_ssize_t i, Py_ssize_t j) in proxy_slice() argument
553 if (!proxy_checkref(proxy)) in proxy_slice()
555 return PySequence_GetSlice(PyWeakref_GET_OBJECT(proxy), i, j); in proxy_slice()
559 proxy_ass_slice(PyWeakReference *proxy, Py_ssize_t i, Py_ssize_t j, PyObject *value) in proxy_ass_slice() argument
561 if (!proxy_checkref(proxy)) in proxy_ass_slice()
563 return PySequence_SetSlice(PyWeakref_GET_OBJECT(proxy), i, j, value); in proxy_ass_slice()
567 proxy_contains(PyWeakReference *proxy, PyObject *value) in proxy_contains() argument
569 if (!proxy_checkref(proxy)) in proxy_contains()
571 return PySequence_Contains(PyWeakref_GET_OBJECT(proxy), value); in proxy_contains()
578 proxy_length(PyWeakReference *proxy) in proxy_length() argument
580 if (!proxy_checkref(proxy)) in proxy_length()
582 return PyObject_Length(PyWeakref_GET_OBJECT(proxy)); in proxy_length()
588 proxy_setitem(PyWeakReference *proxy, PyObject *key, PyObject *value) in WRAP_BINARY()
590 if (!proxy_checkref(proxy)) in WRAP_BINARY()
594 return PyObject_DelItem(PyWeakref_GET_OBJECT(proxy), key); in WRAP_BINARY()
596 return PyObject_SetItem(PyWeakref_GET_OBJECT(proxy), key, value); in WRAP_BINARY()
602 proxy_iter(PyWeakReference *proxy) in proxy_iter() argument
604 if (!proxy_checkref(proxy)) in proxy_iter()
606 return PyObject_GetIter(PyWeakref_GET_OBJECT(proxy)); in proxy_iter()
610 proxy_iternext(PyWeakReference *proxy) in proxy_iternext() argument
612 if (!proxy_checkref(proxy)) in proxy_iternext()
614 return PyIter_Next(PyWeakref_GET_OBJECT(proxy)); in proxy_iternext()
762 PyWeakReference *ref, *proxy; in PyWeakref_NewRef() local
771 get_basic_refs(*list, &ref, &proxy); in PyWeakref_NewRef()
787 get_basic_refs(*list, &ref, &proxy); in PyWeakref_NewRef()
804 prev = (proxy == NULL) ? ref : proxy; in PyWeakref_NewRef()
821 PyWeakReference *ref, *proxy; in PyWeakref_NewProxy() local
830 get_basic_refs(*list, &ref, &proxy); in PyWeakref_NewProxy()
835 result = proxy; in PyWeakref_NewProxy()
852 get_basic_refs(*list, &ref, &proxy); in PyWeakref_NewProxy()
854 if (proxy != NULL) { in PyWeakref_NewProxy()
860 Py_INCREF(result = proxy); in PyWeakref_NewProxy()
866 prev = (proxy == NULL) ? ref : proxy; in PyWeakref_NewProxy()