From ce75954a02b6ba386cb9677c9e492af9b8de328a Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 28 Apr 2013 13:02:44 -0700 Subject: gras: simplify PMC registration with new macro --- PMC | 2 +- grextras | 2 +- python/gras/GRAS_Tags.i | 27 ++++----------------------- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/PMC b/PMC index 963f85f..09f9ae4 160000 --- a/PMC +++ b/PMC @@ -1 +1 @@ -Subproject commit 963f85f9a8e050a6999b9bf4ed600393c5e42011 +Subproject commit 09f9ae45cf42f32a2a00e4cc39c9856aa3128bc5 diff --git a/grextras b/grextras index fe4b669..baad45f 160000 --- a/grextras +++ b/grextras @@ -1 +1 @@ -Subproject commit fe4b669f98aeda1bef5a04372378c9f1073a15e6 +Subproject commit baad45ff699786f1416f09c6beaad4eb99f07456 diff --git a/python/gras/GRAS_Tags.i b/python/gras/GRAS_Tags.i index c2c640e..84cbbe3 100644 --- a/python/gras/GRAS_Tags.i +++ b/python/gras/GRAS_Tags.i @@ -10,27 +10,8 @@ DECL_PMC_SWIG_TYPE(gras::StreamTag, swig_stream_tag) DECL_PMC_SWIG_TYPE(gras::PacketMsg, swig_packet_msg) %pythoncode %{ - -from GRAS_SBuffer import SBuffer - -RegisterPy2PMC( - is_py = lambda x: isinstance(x, StreamTag), - py2pmc = swig_stream_tag_to_pmc, -) - -RegisterPMC2Py( - is_pmc = pmc_is_swig_stream_tag, - pmc2py = pmc_to_swig_stream_tag, -) - -RegisterPy2PMC( - is_py = lambda x: isinstance(x, PacketMsg), - py2pmc = swig_packet_msg_to_pmc, -) - -RegisterPMC2Py( - is_pmc = pmc_is_swig_packet_msg, - pmc2py = pmc_to_swig_packet_msg, -) - +from GRAS_Tags import StreamTag, PacketMsg %} + +REG_PMC_SWIG_TYPE(swig_stream_tag, StreamTag) +REG_PMC_SWIG_TYPE(swig_packet_msg, PacketMsg) -- cgit