Lines Matching refs:reference

152     /// Return the object's current reference count
164 Holds a reference to a Python object (no reference counting)
167 ``PyObject *`` in Python's C API). It does not perform any automatic reference
171 The `object` class inherits from `handle` and adds automatic reference
186 Manually increase the reference count of the Python object. Usually, it is
188 this function automatically. Returns a reference to itself.
193 Manually decrease the reference count of the Python object. Usually, it is
195 this function automatically. Returns a reference to itself.
221 Holds a reference to a Python object (with reference counting)
225 optionally increases the object's reference count upon construction, and it
226 *always* decreases the reference count when the `object` instance goes out of
228 easier to get reference counting right at the first attempt.
235 /// Copy constructor; always increases the reference count
237 /// Move constructor; steals the object from ``other`` and preserves its reference count
244 object's reference count. The function returns a raw handle to the original
290 Declare that a `handle` or ``PyObject *`` is a certain type and borrow the reference.
305 Like `reinterpret_borrow`, but steals the reference.
560 // PySequence_SetItem does not steal a reference to 'val'
577 // PyList_SetItem steals a reference to 'val'
594 // PyTuple_SetItem steals a reference to 'val'
611 using reference = typename Policy::reference;
617 reference operator*() const { return Policy::dereference(); }
618 reference operator[](difference_type n) const { return *(*this + n); }
656 using reference = const handle;
661 reference dereference() const { return *ptr; }
677 using reference = sequence_accessor;
682 reference dereference() const { return {obj, static_cast<size_t>(index)}; }
699 using reference = const value_type;
705 reference dereference() const { return {key, value}; }
827 using reference = const handle;
843 reference operator*() const {
933 /// Return string representation -- always returns a new reference, even if already a str
1035 /// Return the truth value of an object -- always returns a new reference
1117 if (!m_ptr) pybind11_fail("Could not allocate weak reference!");
1234 /// Call the `dict` Python type -- always returns a new reference