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

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

for_evaluationFunction · 0.85

Tested by

no test coverage detected