Skip to content
Snippets Groups Projects

Add custom pythonization callback to SmartRefVector

Merged Christoph Hasse requested to merge chasse/Gaudi:prep_smartrefvector_for_new_pyroot into master

Add custom pythonization callback to SmartRefVector to avoid mapping of C++ operator() to python __getitem__

See also discussion here Fix taken from suggestion from here

Without this fix the command: python -c "import cppyy; a = cppyy.gbl.SmartRefVector('DataObject')(); a.emplace_back(); print(type(a[0]) )
will print:
<class cppyy.gbl.SmartRefVector<DataObject> at 0xd048c10>
But after fix:
<class cppyy.gbl.SmartRef<DataObject> at 0xd6565a0>

cc @clemenci

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading