Skip to content

Conversation

@Vipul-Cariappa
Copy link
Collaborator

Needs test:

import cppyy
from cppyy import gbl

cppyy.cppdef(r"""
namespace LLV {
int x = 10;
int *ptr_x = &x;
int *ptr_null = nullptr;
}
""")

assert cppyy.addressof(gbl.LLV.ptr_x)
assert cppyy.addressof(gbl.LLV.ptr_null) == 0

Copy link

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

Any chance of adding a test?

@Vipul-Cariappa
Copy link
Collaborator Author

Tests go to cppyy repo. Will add soon.

Vipul-Cariappa added a commit to Vipul-Cariappa/cppyy-compiler-research that referenced this pull request Nov 26, 2025
Copy link

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

LGTM!

@Vipul-Cariappa Vipul-Cariappa merged commit 8757c17 into compiler-research:master Nov 26, 2025
34 checks passed
@Vipul-Cariappa Vipul-Cariappa deleted the dev/addressof-LowLevelView branch November 26, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants