MCPcopy Index your code
hub / github.com/python/cpython / _PyObject_VAR_SIZE

Function _PyObject_VAR_SIZE

Tools/gdb/libpython.py:464–472  ·  view source on GitHub ↗
(typeobj, nitems)

Source from the content-addressed store, hash-verified

462 self.address)
463
464def _PyObject_VAR_SIZE(typeobj, nitems):
465 if _PyObject_VAR_SIZE._type_size_t is None:
466 _PyObject_VAR_SIZE._type_size_t = gdb.lookup_type('size_t')
467
468 return ( ( typeobj.field('tp_basicsize') +
469 nitems * typeobj.field('tp_itemsize') +
470 (_sizeof_void_p() - 1)
471 ) & ~(_sizeof_void_p() - 1)
472 ).cast(_PyObject_VAR_SIZE._type_size_t)
473_PyObject_VAR_SIZE._type_size_t = None
474
475class HeapTypeObjectPtr(PyObjectPtr):

Callers 1

get_attr_dictMethod · 0.85

Calls 3

_sizeof_void_pFunction · 0.85
castMethod · 0.80
fieldMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…