[pygccxml-commit] SF.net SVN: pygccxml: [539] pyplusplus_dev
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2006-09-14 05:10:09
|
Revision: 539
http://svn.sourceforge.net/pygccxml/?rev=539&view=rev
Author: roman_yakovenko
Date: 2006-09-13 22:09:55 -0700 (Wed, 13 Sep 2006)
Log Message:
-----------
fixing "create_castinig_constructor" functionality.
Py++ will do generate them by default
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py
pyplusplus_dev/pyplusplus/module_builder/builder.py
pyplusplus_dev/unittests/casting_tester.py
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2006-09-13 11:08:13 UTC (rev 538)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2006-09-14 05:09:55 UTC (rev 539)
@@ -216,7 +216,7 @@
declarations.constructor_t.__init__( self, *arguments, **keywords )
calldef_t.__init__( self )
self._body = ''
- self._allow_implicit_conversion = False
+ self._allow_implicit_conversion = True
def _get_body(self):
return self._body
@@ -255,7 +255,7 @@
self._allow_implicit_conversion = allow_implicit_conversion
allow_implicit_conversion = property( _get_allow_implicit_conversion, _set_allow_implicit_conversion
, doc="boolean, indicates whether Py++ should generate implicitly_convertible code or not" \
- "Default value is calculated from the constructor type" )
+ "Default value is calculated from the constructor type." )
class destructor_t( declarations.destructor_t, calldef_t ):
"""you may ignore this class for he time being.
Modified: pyplusplus_dev/pyplusplus/module_builder/builder.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_builder/builder.py 2006-09-13 11:08:13 UTC (rev 538)
+++ pyplusplus_dev/pyplusplus/module_builder/builder.py 2006-09-14 05:09:55 UTC (rev 539)
@@ -203,7 +203,7 @@
def build_code_creator( self
, module_name
, boost_python_ns_name='bp'
- , create_castinig_constructor=False
+ , create_castinig_constructor=True
, call_policies_resolver_=None
, types_db=None
, target_configuration=None
@@ -226,13 +226,14 @@
and returns documentation string
@type doc_extractor: callable or None
"""
- if create_castinig_constructor:
- msg = os.linesep.join([
+ msg = os.linesep.join([
"create_castinig_constructor argument is deprecated and should not be used."
, "If you still want Py++ to generate implicitly_convertible code, consider to use allow_implicit_conversion constructor property"
, "mb = module_builder_t(...)"
, "mb.constructors().allow_implicit_conversion = True"])
- warnings.warn(msg, DeprecationWarning, stacklevel=2)
+ warnings.warn(msg, DeprecationWarning, stacklevel=2)
+
+ if create_castinig_constructor:
self.global_ns.constructors().allow_implicit_conversion = True
creator = mcreator_package.creator_t( self.global_ns
Modified: pyplusplus_dev/unittests/casting_tester.py
===================================================================
--- pyplusplus_dev/unittests/casting_tester.py 2006-09-13 11:08:13 UTC (rev 538)
+++ pyplusplus_dev/unittests/casting_tester.py 2006-09-14 05:09:55 UTC (rev 539)
@@ -17,9 +17,6 @@
, tester_t.EXTENSION_NAME
, *args )
- def customize( self, mb ):
- mb.constructors().allow_implicit_conversion = True
-
def run_tests( self, module):
x_inst = module.x()
x_inst.value = 25
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|