diff options
author | Mikko Lehtonen <scoopr@iki.fi> | 2017-03-02 00:59:58 +0200 |
---|---|---|
committer | Mikko Lehtonen <scoopr@iki.fi> | 2017-03-04 22:28:47 +0200 |
commit | 4067214465da14e4037be47088d5f0c97de1f9e3 (patch) | |
tree | a7f2bdcef6b5739275146f815efd4c013676b629 | |
parent | 598ed63e9594539c863475d733fc38396b4e8764 (diff) |
objc: Implement tracing for ObjCInterface
Follows all the method signatures
-rw-r--r-- | src/ir/objc.rs | 14 | ||||
-rw-r--r-- | src/ir/ty.rs | 4 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/ir/objc.rs b/src/ir/objc.rs index 963c8e20..5c721243 100644 --- a/src/ir/objc.rs +++ b/src/ir/objc.rs @@ -2,6 +2,7 @@ use super::context::BindgenContext; use super::function::FunctionSig; +use super::traversal::{Trace, Tracer}; use clang; use clang_sys::CXChildVisit_Continue; use clang_sys::CXCursor_ObjCCategoryDecl; @@ -168,3 +169,16 @@ impl ObjCInstanceMethod { .join("") } } + +impl Trace for ObjCInterface { + type Extra = (); + + fn trace<T>(&self, context: &BindgenContext, tracer: &mut T, _: &()) + where T: Tracer, + { + for method in &self.methods + { + method.signature.trace(context, tracer, &()); + } + } +} diff --git a/src/ir/ty.rs b/src/ir/ty.rs index 46083881..51652000 100644 --- a/src/ir/ty.rs +++ b/src/ir/ty.rs @@ -1326,8 +1326,8 @@ impl Trace for Type { tracer.visit(id); } - TypeKind::ObjCInterface(_) => { - // TODO: + TypeKind::ObjCInterface(ref interface) => { + interface.trace(context, tracer, &()); } // None of these variants have edges to other items and types. |