From c848a1c03a595636e95d464df9987ba2da23a5e5 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 23 Feb 2012 15:32:02 +0000 Subject: [PATCH 4/4] Stop generating lists of signals marshallers altogether --- examples/extensions/Makefile.am | 15 --------- examples/extensions/extensions-cli.c | 1 - examples/extensions/extensions.c | 1 - telepathy-glib/Makefile.am | 1 - telepathy-glib/codegen.am | 20 ------------ telepathy-glib/signals-marshal.list | 25 --------------- tools/Makefile.am | 3 -- tools/glib-signals-marshal-gen.py | 55 ---------------------------------- 8 files changed, 0 insertions(+), 121 deletions(-) delete mode 100644 telepathy-glib/signals-marshal.list delete mode 100644 tools/glib-signals-marshal-gen.py diff --git a/examples/extensions/Makefile.am b/examples/extensions/Makefile.am index b1e1f4c..b562f9c 100644 --- a/examples/extensions/Makefile.am +++ b/examples/extensions/Makefile.am @@ -41,9 +41,6 @@ libexample_extensions_la_SOURCES = \ extensions.h nodist_libexample_extensions_la_SOURCES = \ - _gen/signals-marshal.c \ - _gen/signals-marshal.h \ - _gen/signals-marshal.list \ _gen/register-dbus-glib-marshallers-body.h \ _gen/enums.h \ _gen/gtypes.h \ @@ -84,17 +81,6 @@ _gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \ $< _gen/gtypes Example -_gen/signals-marshal.list: _gen/all.xml \ - $(tools_dir)/glib-signals-marshal-gen.py - $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@ - -_gen/signals-marshal.h: _gen/signals-marshal.list Makefile.am - $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_example_ext_marshal $< > $@ - -_gen/signals-marshal.c: _gen/signals-marshal.list Makefile.am - $(AM_V_GEN){ echo '#include "_gen/signals-marshal.h"' && \ - $(GLIB_GENMARSHAL) --body --prefix=_example_ext_marshal $< ; } > $@ - _gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \ $(tools_dir)/glib-client-marshaller-gen.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \ @@ -135,7 +121,6 @@ _gen/svc-connection.c _gen/svc-connection.h: _gen/connection.xml \ --filename=_gen/svc-connection \ --signal-marshal-prefix=_example_ext \ --include='' \ - --include='"_gen/signals-marshal.h"' \ --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ --allow-unstable \ $< Example_Svc_ diff --git a/examples/extensions/extensions-cli.c b/examples/extensions/extensions-cli.c index 363796b..4302e3b 100644 --- a/examples/extensions/extensions-cli.c +++ b/examples/extensions/extensions-cli.c @@ -8,7 +8,6 @@ static void _example_ext_register_dbus_glib_marshallers (void); /* include auto-generated stubs for client-specific code */ -#include "_gen/signals-marshal.h" #include "_gen/cli-connection-body.h" #include "_gen/register-dbus-glib-marshallers-body.h" diff --git a/examples/extensions/extensions.c b/examples/extensions/extensions.c index eeda462..4707c7a 100644 --- a/examples/extensions/extensions.c +++ b/examples/extensions/extensions.c @@ -3,4 +3,3 @@ /* include auto-generated stubs for things common to service and client */ #include "_gen/gtypes-body.h" #include "_gen/interfaces-body.h" -#include "_gen/signals-marshal.h" diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am index 2f47399..57024bf 100644 --- a/telepathy-glib/Makefile.am +++ b/telepathy-glib/Makefile.am @@ -273,7 +273,6 @@ libtelepathy_glib_internal_la_SOURCES = \ proxy-methods.c \ proxy-signals.c \ run.c \ - signals-marshal.list \ signalled-message.c \ signalled-message-internal.h \ simple-approver.c \ diff --git a/telepathy-glib/codegen.am b/telepathy-glib/codegen.am index c15dfc7..e6d1159 100644 --- a/telepathy-glib/codegen.am +++ b/telepathy-glib/codegen.am @@ -82,10 +82,6 @@ nodist_geninclude_HEADERS = \ nodist_libtelepathy_glib_internal_la_SOURCES = \ _gen/error-str.c \ - _gen/signals-marshal.c \ - _gen/signals-marshal.h \ - _gen/signals-marshal.list \ - _gen/tp-signals-marshal.list \ _gen/interfaces-body.h \ _gen/genums.c \ _gen/gtypes-body.h \ @@ -174,21 +170,6 @@ _gen/register-dbus-glib-marshallers-body.h: _gen/stable-spec.xml \ $(tools_dir)/glib-client-marshaller-gen.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< _tp > $@ -_gen/tp-signals-marshal.list: $(tools_dir)/glib-signals-marshal-gen.py \ - _gen/stable-spec.xml - $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py \ - _gen/stable-spec.xml > $@ - -_gen/signals-marshal.list: signals-marshal.list _gen/tp-signals-marshal.list - $(AM_V_GEN)sort -u $^ > $@ - -_gen/signals-marshal.h: _gen/signals-marshal.list codegen.am - $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_tp_marshal $< > $@ - -_gen/signals-marshal.c: _gen/signals-marshal.list codegen.am - $(AM_V_GEN){ echo '#include "_gen/signals-marshal.h"' && \ - $(GLIB_GENMARSHAL) --body --prefix=_tp_marshal $< ; } > $@ - _gen/genums.c: _gen/spec-stamp genums.c.template $(our_headers) codegen.am $(AM_V_GEN)( cd $(srcdir) && \ $(GLIB_MKENUMS) --template genums.c.template $(our_headers) \ @@ -216,7 +197,6 @@ _gen/tp-svc-%.c _gen/tp-svc-%.h: _gen/tp-spec-%.xml \ --filename=_gen/tp-svc-$* \ --signal-marshal-prefix=_tp \ --include='' \ - --include="\"_gen/signals-marshal.h\"" \ --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ $< Tp_Svc_ diff --git a/telepathy-glib/signals-marshal.list b/telepathy-glib/signals-marshal.list deleted file mode 100644 index eec7eab..0000000 --- a/telepathy-glib/signals-marshal.list +++ /dev/null @@ -1,25 +0,0 @@ -VOID:BOXED -VOID:BOXED,BOXED -VOID:BOXED,BOXED,BOXED,BOXED,OBJECT,BOXED -VOID:BOXED,UINT,INT,STRING -VOID:INT,UINT,STRING -VOID:OBJECT,BOOLEAN -VOID:OBJECT,BOXED -VOID:OBJECT,INT,UINT,UINT -VOID:OBJECT,INT64,OBJECT -VOID:OBJECT,OBJECT -VOID:OBJECT,POINTER -VOID:OBJECT,POINTER,POINTER -VOID:OBJECT,STRING,STRING -VOID:OBJECT,UINT,INT,STRING -VOID:OBJECT,UINT,STRING -VOID:POINTER,OBJECT -VOID:POINTER,UINT,INT,STRING -VOID:STRING,UINT,UINT,BOXED -VOID:UINT,BOXED -VOID:UINT,INT,STRING -VOID:UINT,OBJECT -VOID:UINT,STRING,STRING -VOID:UINT,UINT,BOXED,BOXED -VOID:UINT,UINT,UINT,STRING,BOXED -VOID:VOID diff --git a/tools/Makefile.am b/tools/Makefile.am index 2f99e02..02ea02c 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -32,7 +32,6 @@ EXTRA_DIST = \ glib-ginterface-gen.py \ glib-gtypes-generator.py \ glib-interfaces-gen.py \ - glib-signals-marshal-gen.py \ gobject-foo.py \ lcov.am \ libtpcodegen.py \ @@ -68,8 +67,6 @@ glib-gtypes-generator.py: libglibcodegen.py $(AM_V_GEN)touch $@ glib-interfaces-gen.py: libglibcodegen.py $(AM_V_GEN)touch $@ -glib-signals-marshal-gen.py: libglibcodegen.py - $(AM_V_GEN)touch $@ TELEPATHY_SPEC_SRCDIR = $(top_srcdir)/../telepathy-spec maintainer-update-from-telepathy-spec: diff --git a/tools/glib-signals-marshal-gen.py b/tools/glib-signals-marshal-gen.py deleted file mode 100644 index 0d02c13..0000000 --- a/tools/glib-signals-marshal-gen.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/python - -import sys -import xml.dom.minidom -from string import ascii_letters, digits - - -from libglibcodegen import signal_to_marshal_name, method_to_glue_marshal_name - - -class Generator(object): - - def __init__(self, dom): - self.dom = dom - self.marshallers = {} - - def do_method(self, method): - marshaller = method_to_glue_marshal_name(method, 'PREFIX') - - assert '__' in marshaller - rhs = marshaller.split('__', 1)[1].split('_') - - self.marshallers[marshaller] = rhs - - def do_signal(self, signal): - marshaller = signal_to_marshal_name(signal, 'PREFIX') - - assert '__' in marshaller - rhs = marshaller.split('__', 1)[1].split('_') - - self.marshallers[marshaller] = rhs - - def __call__(self): - methods = self.dom.getElementsByTagName('method') - - for method in methods: - self.do_method(method) - - signals = self.dom.getElementsByTagName('signal') - - for signal in signals: - self.do_signal(signal) - - all = self.marshallers.keys() - all.sort() - for marshaller in all: - rhs = self.marshallers[marshaller] - if not marshaller.startswith('g_cclosure'): - print 'VOID:' + ','.join(rhs) - -if __name__ == '__main__': - argv = sys.argv[1:] - dom = xml.dom.minidom.parse(argv[0]) - - Generator(dom)() -- 1.7.9.1