MCPcopy Create free account
hub / github.com/apache/arrow / __init__

Method __init__

cpp/gdb_arrow.py:504–516  ·  view source on GitHub ↗
(self, val)

Source from the content-addressed store, hash-verified

502 """
503
504 def __init__(self, val):
505 self.val = val
506 try:
507 # libstdc++ internals
508 impl = self.val['_M_impl']
509 self._data = impl['_M_start']
510 self._size = int(impl['_M_finish'] - self._data)
511 except gdb.error:
512 # fallback for other C++ standard libraries
513 self._data = int(gdb.parse_and_eval(
514 f"{for_evaluation(self.val)}.data()"))
515 self._size = int(gdb.parse_and_eval(
516 f"{for_evaluation(self.val)}.size()"))
517
518 def _check_index(self, index):
519 if index < 0 or index >= self._size:

Callers

nothing calls this directly

Calls 1

for_evaluationFunction · 0.85

Tested by

no test coverage detected