diff options
-rw-r--r-- | src/clang.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/clang.rs b/src/clang.rs index e62ff74c..4b3ae696 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -879,7 +879,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 + }, } } } |