[vala] vapigen: Automatically adjust method names when setting parent.
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] vapigen: Automatically adjust method names when setting parent.
- Date: Sat, 21 Aug 2010 20:40:13 +0000 (UTC)
commit a58839f8cc0cc6b8a12cf08609e222deefab2b2e
Author: Evan Nemerson <evan coeus-group com>
Date: Sat Aug 21 13:28:29 2010 -0700
vapigen: Automatically adjust method names when setting parent.
vapigen/valagidlparser.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 1ba59d2..99d2d84 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -1951,6 +1951,13 @@ public class Vala.GIdlParser : CodeVisitor {
// force async function, even if it doesn't end in _async
m.coroutine = true;
}
+ } else if (nv[0] == "parent") {
+ Symbol container = get_container_from_name (eval (nv[1]));
+ var prefix = container.get_lower_case_cprefix ();
+ if (symbol.has_prefix (prefix)) {
+ m.set_cname (m.name);
+ m.name = symbol.offset (prefix.length);
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]