Revision: 7278
http://svn.sourceforge.net/mahogany/?rev=7278&view=rev
Author: vadz
Date: 2007-06-05 16:48:25 -0700 (Tue, 05 Jun 2007)
Log Message:
-----------
fix order of parameters in PY_CALLBACK when (incidentally fixes compilation on
64 bit systems in this case); minor cleanup
Modified Paths:
--------------
trunk/M/include/Mcommon.h
Modified: trunk/M/include/Mcommon.h
===================================================================
--- trunk/M/include/Mcommon.h 2007-06-05 23:39:35 UTC (rev 7277)
+++ trunk/M/include/Mcommon.h 2007-06-05 23:48:25 UTC (rev 7278)
@@ -126,8 +126,9 @@
These macros do nothing and return the default returnvalue when
Python is disabled.
*/
+#ifdef USE_PYTHON
+
//@{
-#ifdef USE_PYTHON
/** This macro takes three arguments: the callback function name to
look up in a profile, a default return value, and a profile
pointer (can be NULL).
@@ -135,7 +136,9 @@
object needs to support the GetClasName() method to get the Python
class name for the argument.
*/
-# define PY_CALLBACK(name,default,profile)
PythonCallback(name,default,this,this->GetClassName(),profile)
+# define PY_CALLBACK(name, def, profile) \
+ PythonCallback(name,def,this,this->GetClassName(),profile)
+
/** This macro takes multiple arguments.
The last argument is the default return value.
The first argument is a list of arguments in brackets, it must
@@ -147,14 +150,15 @@
must follow the format string.
*/
-# define PY_CALLBACKVA(arg,default) PythonCallback arg
-#else
-# define PY_CALLBACK(name, profile, default) PythonCallback((int)default)
- inline int PythonCallback(int def) { return def; }
-# define PY_CALLBACKVA(arg,default) PythonCallback((int)default)
-#endif
+# define PY_CALLBACKVA(arg, def) PythonCallback arg
//@}
+#else // !USE_PYTHON
+# define PY_CALLBACK(name, def, profile) (def)
+# define PY_CALLBACKVA(arg, def) (def)
+#endif // USE_PYTHON/!USE_PYTHON
+
+
// ----------------------------------------------------------------------------
// misc types
// ----------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates