diff options
author | Edward Hervey <bilboed@bilboed.com> | 2006-12-16 14:41:21 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2006-12-16 14:41:21 +0000 |
commit | 41e2b7706002e1c8caf3bb877287ba326ea483ba (patch) | |
tree | 58102f62670e2e7c035e08a3e17832c42a036359 | |
parent | fb23b775cc11925f0f0b13993f74a6819d61e8f0 (diff) |
Move GstIterator ArgType definition and usage for the codegenerator to gst/arg-types.py. It has nothing to do in the ...
Original commit message from CVS:
* codegen/argtypes.py:
* gst/arg-types.py:
Move GstIterator ArgType definition and usage for the codegenerator
to gst/arg-types.py. It has nothing to do in the codegenerator code.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | codegen/argtypes.py | 7 | ||||
-rw-r--r-- | gst/arg-types.py | 6 |
3 files changed, 13 insertions, 7 deletions
@@ -1,3 +1,10 @@ +2006-12-16 Edward Hervey <edward@fluendo.com> + + * codegen/argtypes.py: + * gst/arg-types.py: + Move GstIterator ArgType definition and usage for the codegenerator + to gst/arg-types.py. It has nothing to do in the codegenerator code. + 2006-12-15 Thomas Vander Stichele <thomas at apestaart dot org> * Makefile.am: diff --git a/codegen/argtypes.py b/codegen/argtypes.py index e578a8c..948bae1 100644 --- a/codegen/argtypes.py +++ b/codegen/argtypes.py @@ -974,11 +974,6 @@ 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() @@ -1058,8 +1053,6 @@ matcher.register('gfloat', arg) arg = FileArg() matcher.register('FILE*', arg) -matcher.register('GstIterator*', GstIteratorArg()) - # enums, flags, objects matcher.register('GdkAtom', AtomArg()) diff --git a/gst/arg-types.py b/gst/arg-types.py index 4fea63b..c2c4533 100644 --- a/gst/arg-types.py +++ b/gst/arg-types.py @@ -140,6 +140,11 @@ class GstCapsArg(ArgType): raise RuntimeError, "write_return not implemented for %s" % ptype info.codeafter.append(' return pyg_boxed_new (GST_TYPE_CAPS, ret, '+copyval+', TRUE);') +class GstIteratorArg(ArgType): + def write_return(self, ptype, ownsreturn, info): + info.varlist.add('GstIterator', '*ret') + info.codeafter.append(' return pygst_iterator_new(ret);') + class GstMiniObjectParam(Parameter): def get_c_type(self): @@ -319,6 +324,7 @@ matcher.register('xmlDocPtr', XmlDocArg()) matcher.register('GstCaps', GstCapsArg()) #FIXME: does this work? matcher.register('GstCaps*', GstCapsArg()) #FIXME: does this work? matcher.register('const-GstCaps*', GstCapsArg()) +matcher.register('GstIterator*', GstIteratorArg()) arg = PointerArg('gpointer', 'G_TYPE_POINTER') matcher.register('GstClockID', arg) |