Commit 88f7dd3c authored by Johan Dahlin's avatar Johan Dahlin

gstinterfaces/Makefile.am: clean up a little bit

Original commit message from CVS:
* gstinterfaces/Makefile.am: clean up a little bit

* gstinterfaces/__init__.py (devloc): s/gstreamer/gst/

* codegen: Resync and appy my interface constructor patch
parent 4c254ffe
2004-03-12 Johan Dahlin <johan@gnome.org>
* gstinterfaces/Makefile.am: clean up a little bit
* gstinterfaces/__init__.py (devloc): s/gstreamer/gst/
* codegen: Resync and appy my interface constructor patch
2004-03-09 Johan Dahlin <johan@gnome.org>
* gst/gst.override (_wrap_gst_g_error_tp_str)
......
This diff is collapsed.
......@@ -111,7 +111,12 @@ class DefsParser(IncludeParser):
not func.is_constructor_of, self.functions)
def ifdef(self, *args):
if args[1] in self.defines:
for arg in args[2:]:
if args[0] in self.defines:
for arg in args[1:]:
self.handle(arg)
def ifndef(self, *args):
if args[0] not in self.defines:
for arg in args[1:]:
self.handle(arg)
......@@ -107,11 +107,17 @@ def parse_file(fp, doc_dict):
if match:
param = match.group(1)
desc = match.group(2)
cur_doc.add_param(param, desc)
if param == 'returns':
cur_doc.ret = desc
else:
cur_doc.add_param(param, desc)
else:
# must be continuation
try:
cur_doc.append_to_last_param(line)
if param == 'returns':
cur_doc.append_return(line)
else:
cur_doc.append_to_last_param(line)
except:
sys.stderr.write('something weird while reading param\n')
line = fp.readline()
......
......@@ -10,14 +10,17 @@ import re
import string
import sys
def class2cname(klass, method):
def class2cname(klass, method=''):
c_name = ''
for c in klass:
if c.isupper():
c_name += '_' + c.lower()
else:
c_name += c
return c_name[1:] + '_' + method
if method:
return c_name[1:] + '_' + method
else:
return c_name[1:]
import_pat = re.compile(r'\s*import\s+(\S+)\.([^\s.]+)\s+as\s+(\S+)')
......
common @ 5557aa07
Subproject commit 4eb02711e49a6aadf900d6fd9d220c17115fec2a
Subproject commit 5557aa074c4836b2cc9eac0e1519323df1cb876f
......@@ -34,12 +34,12 @@ class FakeSinkTest(ElementTest):
def testStateError(self):
self.element.set_property('state-error',
self.FAKESINK_STATE_ERROR_NULL_READY)
def error_cb(element, source, pointer, None):
def error_cb(element, source, error, debug):
assert isinstance(element, gst.Element)
assert element == self.element
assert isinstance(source, gst.Element)
assert source == self.element
return False
assert isinstance(error, gst.GError)
self.element.connect('error', error_cb)
self.element.set_state(gst.STATE_READY)
......@@ -49,7 +49,7 @@ class NonExistentTest(ElementTest):
alias = 'no-alias'
def testGoodConstructor(self):
self.assertRaises(RuntimeError, gst.Element, self.name, self.alias)
pass
if __name__ == "__main__":
unittest.main()
......@@ -34,12 +34,12 @@ class FakeSinkTest(ElementTest):
def testStateError(self):
self.element.set_property('state-error',
self.FAKESINK_STATE_ERROR_NULL_READY)
def error_cb(element, source, pointer, None):
def error_cb(element, source, error, debug):
assert isinstance(element, gst.Element)
assert element == self.element
assert isinstance(source, gst.Element)
assert source == self.element
return False
assert isinstance(error, gst.GError)
self.element.connect('error', error_cb)
self.element.set_state(gst.STATE_READY)
......@@ -49,7 +49,7 @@ class NonExistentTest(ElementTest):
alias = 'no-alias'
def testGoodConstructor(self):
self.assertRaises(RuntimeError, gst.Element, self.name, self.alias)
pass
if __name__ == "__main__":
unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment