[beast: 14/70] V8BSE: generate class methods
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 14/70] V8BSE: generate class methods
- Date: Tue, 28 Mar 2017 23:22:53 +0000 (UTC)
commit a6f8b340a807de6ca011b4c7f9ee5914336683f8
Author: Tim Janik <timj gnu org>
Date: Sun Feb 19 21:45:27 2017 +0100
V8BSE: generate class methods
Signed-off-by: Tim Janik <timj gnu org>
ebeast/v8bse/V8Stub.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/ebeast/v8bse/V8Stub.py b/ebeast/v8bse/V8Stub.py
index 567c664..87e1dce 100644
--- a/ebeast/v8bse/V8Stub.py
+++ b/ebeast/v8bse/V8Stub.py
@@ -107,6 +107,12 @@ class Generator:
b += 'v8pp::property (&%s::%s, &%s::%s))\n' % (cn, fname, cn, fname)
elif tp.storage == Decls.RECORD:
b += ' .set ("%s", &%s::%s)\n' % (fname, cn, fname)
+ # Class methods
+ if tp.storage == Decls.INTERFACE:
+ for mtp in tp.methods:
+ rtp, mname = mtp.rtype, mtp.name
+ b += ' .set ("%s", &%s::%s)\n' % (mname, cn, mname)
+ # output only non-empty bindings
if b:
s += ' %s\n' % v8ppclass (tp)
s += b
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]