[pygccxml-commit] SF.net SVN: pygccxml: [842] pyplusplus_dev/pyplusplus
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2007-01-04 06:47:18
|
Revision: 842
http://svn.sourceforge.net/pygccxml/?rev=842&view=rev
Author: roman_yakovenko
Date: 2007-01-03 22:46:32 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
adding new warning
adding auto documentation for properties
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/decl_wrappers/properties.py
pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py
pyplusplus_dev/pyplusplus/messages/warnings_.py
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/properties.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/properties.py 2007-01-03 21:19:39 UTC (rev 841)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/properties.py 2007-01-04 06:46:32 UTC (rev 842)
@@ -15,7 +15,7 @@
It keeps
"""
- def __init__( self, name, fget, fset=None, doc='', is_static=False ):
+ def __init__( self, name, fget, fset=None, doc=None, is_static=False ):
self._name = name
self._fget = fget
self._fset = fset
@@ -34,9 +34,19 @@
def fset( self ):
return self._fset
- @property
- def doc( self ):
+ def _get_doc( self ):
+ if None is self._doc:
+ doc = ['get']
+ if self.fset:
+ doc.append( r'\\set' )
+ doc.append( r' property, built on top of \"%s\"' % self.fget )
+ if self.fset:
+ doc.append( r' and \"%s\"' % self.fset )
+ self._doc = '"%s"' % ''.join( doc )
return self._doc
+ def _set_doc( self, doc ):
+ self._doc = doc
+ doc = property( _get_doc, _set_doc )
@property
def is_static( self ):
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py 2007-01-03 21:19:39 UTC (rev 841)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py 2007-01-04 06:46:32 UTC (rev 842)
@@ -101,6 +101,8 @@
return messages.W1033
if self.bits == 0 and self.name == "":
return messages.W1034
+ if declarations.is_array( self.type ) and declarations.array_size( self.type ) < 1:
+ return messages.W1045
type_ = declarations.remove_alias( self.type )
type_ = declarations.remove_const( type_ )
if declarations.is_pointer( type_ ):
Modified: pyplusplus_dev/pyplusplus/messages/warnings_.py
===================================================================
--- pyplusplus_dev/pyplusplus/messages/warnings_.py 2007-01-03 21:19:39 UTC (rev 841)
+++ pyplusplus_dev/pyplusplus/messages/warnings_.py 2007-01-04 06:46:32 UTC (rev 842)
@@ -128,6 +128,10 @@
W1044 = 'Py++ created an ugly alias ("%s") for function wrapper.'
+W1045 = 'Py++ does not expose static arrays with unknown size. ' \
+ 'You can fix this by setting array size to the actual one.' \
+ 'For more information see "array_t" class documentation.'
+
warnings = globals()
for identifier, explanation in warnings.items():
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|