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

Method __init__

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

Source from the content-addressed store, hash-verified

461 """
462
463 def __init__(self, val):
464 self.val = val
465 try:
466 # libstdc++ internals
467 self._data = val['_M_dataplus']['_M_p']
468 self._size = val['_M_string_length']
469 except gdb.error:
470 # fallback for other C++ standard libraries
471 self._data = gdb.parse_and_eval(f"{for_evaluation(val)}.c_str()")
472 self._size = gdb.parse_and_eval(f"{for_evaluation(val)}.size()")
473
474 def __bool__(self):
475 return self._size != 0

Callers

nothing calls this directly

Calls 1

for_evaluationFunction · 0.85

Tested by

no test coverage detected