summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clang.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/clang.rs b/src/clang.rs
index 613e08e8..a3919579 100644
--- a/src/clang.rs
+++ b/src/clang.rs
@@ -875,7 +875,11 @@ impl Type {
pub fn named(&self) -> Type {
unsafe {
Type {
- x: clang_Type_getNamedType(self.x),
+ x: if clang_Type_getNamedType::is_loaded() {
+ clang_Type_getNamedType(self.x)
+ } else {
+ self.x
+ },
}
}
}