summaryrefslogtreecommitdiffstats
path: root/bindings/python/lang.py
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/python/lang.py')
-rw-r--r--bindings/python/lang.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/bindings/python/lang.py b/bindings/python/lang.py
index c8037198..b3ca2b68 100644
--- a/bindings/python/lang.py
+++ b/bindings/python/lang.py
@@ -361,11 +361,7 @@ if WSF_SUPPORT:
py_args = ', ' + ', '.join(py_args)
print >> fd, ' @classmethod'
print >> fd, ' def %s(cls%s):' % (constructor_name, py_args)
- print >> fd, ' obj = cls.__new__(cls)'
- print >> fd, ' obj._cptr = _lasso.%s(%s)' % (m.name[6:], c_args)
- print >> fd, ' if obj._cptr is None:'
- print >> fd, ' raise RuntimeError(\'lasso failed to create object\')'
- print >> fd, ' return obj'
+ print >> fd, ' return cptrToPy(_lasso.%s(%s))' % (m.name[6:], c_args)
print >> fd, ''
# create properties for members