summaryrefslogtreecommitdiff
path: root/codegen
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2005-10-07 01:21:57 +0000
committerJohan Dahlin <johan@gnome.org>2005-10-07 01:21:57 +0000
commit7534ba048688b3c58f13ea478c20fb722838ea26 (patch)
tree91f4768fbe53b5e8777976a74fc190ad737fcaab /codegen
parent01c009d4b3d1acf15a69bbee66ddbfd1cbe7adda (diff)
Add GstIterator wrapping and tests.
Original commit message from CVS: * codegen/argtypes.py: * gst/Makefile.am: * gst/common.h: * gst/gst.defs: * gst/gstbin.override: * gst/gstelement.override: * gst/pygstiterator.c: (pygst_iterator_dealloc), (pygst_iterator_iter_next), (pygst_iterator_new): * testsuite/test_iterator.py: Add GstIterator wrapping and tests.
Diffstat (limited to 'codegen')
-rw-r--r--codegen/argtypes.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/codegen/argtypes.py b/codegen/argtypes.py
index 7e591e3..d4a6219 100644
--- a/codegen/argtypes.py
+++ b/codegen/argtypes.py
@@ -918,6 +918,11 @@ class ArgMatcher:
if not self.argtypes.has_key(otype): return 0
return self.object_is_a(self.get(otype).parent, parent)
+class GstIteratorArg(ArgType):
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('GstIterator', '*ret')
+ info.codeafter.append(' return pygst_iterator_new(ret);')
+
matcher = ArgMatcher()
arg = NoneArg()
@@ -1003,6 +1008,8 @@ matcher.register('gfloat', arg)
arg = FileArg()
matcher.register('FILE*', arg)
+matcher.register('GstIterator*', GstIteratorArg())
+
# enums, flags, objects
matcher.register('GdkAtom', AtomArg())