codegen/codegen.py: Added pyg_[begin|end]_allow_threads before and after call of C methods in python methods wrappers.

Original commit message from CVS:
* codegen/codegen.py:
Added pyg_[begin|end]_allow_threads before and after call of C methods
in python methods wrappers.
This should get rid of more threading issues...
Should we also do that for function calls ?
This commit is contained in:
Edward Hervey 2005-10-04 14:31:47 +00:00
parent e9121b80d4
commit 3241bda36a
2 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2005-10-04 Edward Hervey <edward@fluendo.com>
* codegen/codegen.py:
Added pyg_[begin|end]_allow_threads before and after call of C methods
in python methods wrappers.
This should get rid of more threading issues...
Should we also do that for function calls ?
2005-10-03 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:

View file

@ -324,7 +324,6 @@ class Wrapper:
substdict['parseargs'] = ''
substdict['extraparams'] = ''
flags = 'METH_NOARGS'
return template % substdict, flags
def write_constructor(self):
@ -699,7 +698,9 @@ class GObjectWrapper(Wrapper):
'%(varlist)s' \
'%(parseargs)s' \
'%(codebefore)s' \
' pyg_begin_allow_threads;\n' \
' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n' \
' pyg_end_allow_threads;\n' \
'%(codeafter)s\n' \
'}\n\n'
@ -730,6 +731,7 @@ class GObjectWrapper(Wrapper):
substdict = Wrapper.get_initial_method_substdict(self, method)
substdict['cast'] = string.replace(self.objinfo.typecode, '_TYPE_', '_', 1)
return substdict
def write_default_constructor(self):
return '0'
@ -842,7 +844,9 @@ class GstMiniObjectWrapper(Wrapper):
'%(varlist)s' \
'%(parseargs)s' \
'%(codebefore)s' \
' pyg_begin_allow_threads;\n' \
' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n' \
' pyg_end_allow_threads;\n' \
'%(codeafter)s\n' \
'}\n\n'