Skip to content

[CPyCppyy] Introduce new public CreatePyValueFromMemory function#22512

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:ttree_pyz
Open

[CPyCppyy] Introduce new public CreatePyValueFromMemory function#22512
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:ttree_pyz

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

Add a CPyCppyy API function to build a Python value from a memory address using a Converter, with the possibility to build also an array proxy with a given shape.

This is needed to implement the TTree pythonizations without including private CPyCppyy internals.

In principle, the TTree pythonizations can now also be implemented completely in Python, which would be the next step.

@guitargeek guitargeek requested a review from aaronj0 June 7, 2026 09:22
@guitargeek guitargeek self-assigned this Jun 7, 2026
@guitargeek guitargeek requested a review from vepadulano as a code owner June 7, 2026 09:22
@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 17h 14m 21s ⏱️
 3 859 tests  3 781 ✅   0 💤 78 ❌
76 253 runs  76 014 ✅ 161 💤 78 ❌

For more details on these failures, see this check.

Results for commit 30eb771.

♻️ This comment has been updated with latest results.

Comment thread bindings/pyroot/cppyy/CPyCppyy/src/API.cxx Outdated
Comment thread bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyyModule.cxx Outdated
// delete a previously created converter
CPYCPPYY_EXTERN void DestroyConverter(Converter* p);

// Build a Python value from a memory address using a Converter.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it's not clear what happens to the input memory address. Is the Python value responsible for that memory after calling this function?

Add a CPyCppyy API function to build a Python value from a memory
address using a Converter, with the possibility to build also an array
proxy with a given shape.

This is needed to implement the TTree pythonizations without including
private CPyCppyy internals.

In principle, the TTree pythonizations can now also be implemented
completely in Python, which would be the next step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants