Skip to content

Commit 6d86673

Browse files
change IsXValueReferenceType to GetValueKind (#171)
according to changes in CppInterOp
1 parent 8c75b36 commit 6d86673

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

clingwrapper/src/clingwrapper.cxx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ std::string Cppyy::ResolveName(const std::string& name) {
462462
// }
463463

464464
Cppyy::TCppType_t Cppyy::ResolveEnumReferenceType(TCppType_t type) {
465-
if (!Cpp::IsLValueReferenceType(type))
465+
if (Cpp::GetValueKind(type) != Cpp::ValueKind::LValue)
466466
return type;
467467

468468
TCppType_t nonReferenceType = Cpp::GetNonReferenceType(type);
@@ -532,6 +532,14 @@ Cppyy::TCppType_t Cppyy::GetReferencedType(TCppType_t type, bool rvalue) {
532532
return Cpp::GetReferencedType(type, rvalue);
533533
}
534534

535+
bool Cppyy::IsRValueReferenceType(TCppType_t type) {
536+
return Cpp::GetValueKind(type) == Cpp::ValueKind::RValue;
537+
}
538+
539+
bool Cppyy::IsLValueReferenceType(TCppType_t type) {
540+
return Cpp::GetValueKind(type) == Cpp::ValueKind::LValue;
541+
}
542+
535543
bool Cppyy::IsClassType(TCppType_t type) {
536544
return Cpp::IsRecordType(type);
537545
}
@@ -1357,7 +1365,7 @@ bool Cppyy::GetSmartPtrInfo(
13571365
return false;
13581366

13591367
std::vector<TCppMethod_t> ops;
1360-
Cpp::GetOperator(scope, Cpp::OP_Arrow, ops);
1368+
Cpp::GetOperator(scope, Cpp::Operator::OP_Arrow, ops);
13611369
if (ops.size() != 1)
13621370
return false;
13631371

clingwrapper/src/cpp_cppyy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ namespace Cppyy {
9090
RPY_EXPORTED
9191
std::string ResolveEnum(TCppScope_t enum_scope);
9292
RPY_EXPORTED
93+
bool IsLValueReferenceType(TCppType_t type);
94+
RPY_EXPORTED
95+
bool IsRValueReferenceType(TCppType_t type);
96+
RPY_EXPORTED
9397
bool IsClassType(TCppType_t type);
9498
RPY_EXPORTED
9599
bool IsPointerType(TCppType_t type);

0 commit comments

Comments
 (0)