mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
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:
parent
e9121b80d4
commit
3241bda36a
2 changed files with 13 additions and 1 deletions
|
@ -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>
|
2005-10-03 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
|
|
@ -324,7 +324,6 @@ class Wrapper:
|
||||||
substdict['parseargs'] = ''
|
substdict['parseargs'] = ''
|
||||||
substdict['extraparams'] = ''
|
substdict['extraparams'] = ''
|
||||||
flags = 'METH_NOARGS'
|
flags = 'METH_NOARGS'
|
||||||
|
|
||||||
return template % substdict, flags
|
return template % substdict, flags
|
||||||
|
|
||||||
def write_constructor(self):
|
def write_constructor(self):
|
||||||
|
@ -699,7 +698,9 @@ class GObjectWrapper(Wrapper):
|
||||||
'%(varlist)s' \
|
'%(varlist)s' \
|
||||||
'%(parseargs)s' \
|
'%(parseargs)s' \
|
||||||
'%(codebefore)s' \
|
'%(codebefore)s' \
|
||||||
|
' pyg_begin_allow_threads;\n' \
|
||||||
' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n' \
|
' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n' \
|
||||||
|
' pyg_end_allow_threads;\n' \
|
||||||
'%(codeafter)s\n' \
|
'%(codeafter)s\n' \
|
||||||
'}\n\n'
|
'}\n\n'
|
||||||
|
|
||||||
|
@ -730,6 +731,7 @@ class GObjectWrapper(Wrapper):
|
||||||
substdict = Wrapper.get_initial_method_substdict(self, method)
|
substdict = Wrapper.get_initial_method_substdict(self, method)
|
||||||
substdict['cast'] = string.replace(self.objinfo.typecode, '_TYPE_', '_', 1)
|
substdict['cast'] = string.replace(self.objinfo.typecode, '_TYPE_', '_', 1)
|
||||||
return substdict
|
return substdict
|
||||||
|
|
||||||
def write_default_constructor(self):
|
def write_default_constructor(self):
|
||||||
return '0'
|
return '0'
|
||||||
|
|
||||||
|
@ -842,7 +844,9 @@ class GstMiniObjectWrapper(Wrapper):
|
||||||
'%(varlist)s' \
|
'%(varlist)s' \
|
||||||
'%(parseargs)s' \
|
'%(parseargs)s' \
|
||||||
'%(codebefore)s' \
|
'%(codebefore)s' \
|
||||||
|
' pyg_begin_allow_threads;\n' \
|
||||||
' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n' \
|
' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n' \
|
||||||
|
' pyg_end_allow_threads;\n' \
|
||||||
'%(codeafter)s\n' \
|
'%(codeafter)s\n' \
|
||||||
'}\n\n'
|
'}\n\n'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue