summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikko Lehtonen <scoopr@iki.fi>2017-03-02 00:59:58 +0200
committerMikko Lehtonen <scoopr@iki.fi>2017-03-04 22:28:47 +0200
commit4067214465da14e4037be47088d5f0c97de1f9e3 (patch)
treea7f2bdcef6b5739275146f815efd4c013676b629
parent598ed63e9594539c863475d733fc38396b4e8764 (diff)
objc: Implement tracing for ObjCInterface
Follows all the method signatures
-rw-r--r--src/ir/objc.rs14
-rw-r--r--src/ir/ty.rs4
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.