Skip to content

Conversation

@Vipul-Cariappa
Copy link
Collaborator

resolving them yields char, but we want to treat them as ints therefore we treat them as special cases


fixes 1 test

}

Cppyy::TCppType_t Cppyy::GetRealType(TCppType_t type) {
TCppType_t check_int_typedefs = type;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we move the duplicated code in a helper function?

@Vipul-Cariappa Vipul-Cariappa marked this pull request as draft August 8, 2025 08:11
resolving them yields `char`, but we want to treat them as `int`s
therefore we treat them as special cases
@Vipul-Cariappa Vipul-Cariappa marked this pull request as ready for review August 8, 2025 08:16
return type;
}

Cppyy::TCppType_t int_like_type(Cppyy::TCppType_t type) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn’t that try to get the canonical type of a given type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If the type is int8_t or uint8_t, pointer or reference combinations of it. We do not resolve it char/unsigned char. Because we want to treat them like ints, not chars. Retrieving the canonical type will return the char types. So we need to avoid it here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, ok. I see.

@Vipul-Cariappa Vipul-Cariappa merged commit 960b35c into compiler-research:master Aug 8, 2025
34 checks passed
@Vipul-Cariappa Vipul-Cariappa deleted the dev/int8_t branch August 8, 2025 10:57
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