MCPcopy Create free account
hub / github.com/pybind/pybind11 / set

Method set

include/pybind11/pytypes.h:1182–1187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1180
1181 template <typename IdxType, detail::enable_if_t<std::is_integral<IdxType>::value, int> = 0>
1182 static void set(handle obj, const IdxType &index, handle val) {
1183 // PySequence_SetItem does not steal a reference to 'val'
1184 if (PySequence_SetItem(obj.ptr(), ssize_t_cast(index), val.ptr()) != 0) {
1185 throw error_already_set();
1186 }
1187 }
1188};
1189
1190struct list_item {

Callers

nothing calls this directly

Calls 2

ssize_t_castFunction · 0.85
ptrMethod · 0.80

Tested by

no test coverage detected