summaryrefslogtreecommitdiffstats
path: root/codegen/codegen.py
diff options
context:
space:
mode:
authorPaul Pogonyshev <pogonyshev@gmx.net>2009-05-31 18:56:55 +0300
committerPaul Pogonyshev <pogonyshev@gmx.net>2009-06-12 01:38:56 +0300
commit07e9c18dc092f6546230168b6b69c1b3454e120a (patch)
treeb20d274ac3b814151868605243bbaf469cdca77a /codegen/codegen.py
parent235fde85d015382f2ba38b21968e82b3ac0b6612 (diff)
downloadpygobject-07e9c18dc092f6546230168b6b69c1b3454e120a.tar.gz
pygobject-07e9c18dc092f6546230168b6b69c1b3454e120a.tar.xz
pygobject-07e9c18dc092f6546230168b6b69c1b3454e120a.zip
Make codegen report errors using Python function/method names
Part of bug #584289.
Diffstat (limited to 'codegen/codegen.py')
-rwxr-xr-xcodegen/codegen.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/codegen/codegen.py b/codegen/codegen.py
index bf5dfc5..73324a5 100755
--- a/codegen/codegen.py
+++ b/codegen/codegen.py
@@ -249,10 +249,11 @@ class Wrapper:
def get_initial_class_substdict(self): return {}
def get_initial_constructor_substdict(self, constructor):
- return { 'name': '%s.__init__' % self.objinfo.c_name,
+ return { 'name': '%s.__init__' % self.objinfo.py_name,
'errorreturn': '-1' }
+
def get_initial_method_substdict(self, method):
- substdict = { 'name': '%s.%s' % (self.objinfo.c_name, method.name) }
+ substdict = { 'name': '%s.%s' % (self.objinfo.py_name, method.name) }
if method.unblock_threads:
substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;'
substdict['end_allow_threads'] = 'pyg_end_allow_threads;'
@@ -467,7 +468,7 @@ class Wrapper:
def _get_class_virtual_substdict(self, meth, cname, parent):
substdict = self.get_initial_method_substdict(meth)
- substdict['virtual'] = substdict['name'].split('.')[1]
+ substdict['virtual'] = meth.name
substdict['cname'] = cname
substdict['class_cast_macro'] = parent.typecode.replace(
'_TYPE_', '_', 1) + "_CLASS"
@@ -1133,7 +1134,7 @@ class GInterfaceWrapper(GObjectWrapper):
def _get_class_virtual_substdict(self, meth, cname, parent):
substdict = self.get_initial_method_substdict(meth)
- substdict['virtual'] = substdict['name'].split('.')[1]
+ substdict['virtual'] = meth.name
substdict['cname'] = cname
substdict['typecode'] = self.objinfo.typecode
substdict['vtable'] = self.objinfo.vtable