svn commit: samba r2243 - in branches/SAMBA_4_0/source/scripting/swig: .

tpot at samba.org tpot at samba.org
Tue Sep 7 23:12:29 GMT 2004


Author: tpot
Date: 2004-09-07 23:12:29 +0000 (Tue, 07 Sep 2004)
New Revision: 2243

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/scripting/swig&rev=2243&nolog=1

Log:
Include definition for PRINTF_ATTRIBUTE in Python tdb wrapper.

Modified:
   branches/SAMBA_4_0/source/scripting/swig/tdb.i


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/swig/tdb.i
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/tdb.i	2004-09-07 22:02:44 UTC (rev 2242)
+++ branches/SAMBA_4_0/source/scripting/swig/tdb.i	2004-09-07 23:12:29 UTC (rev 2243)
@@ -45,6 +45,16 @@
 typedef int SIG_ATOMIC_T;
 #endif
 
+#if (__GNUC__ >= 3)
+/** Use gcc attribute to check printf fns.  a1 is the 1-based index of
+ * the parameter containing the format, and a2 the index of the first
+ * argument. Note that some gcc 2.x versions don't handle this
+ * properly **/
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
+#else
+#define PRINTF_ATTRIBUTE(a1, a2)
+#endif
+
 /* Include tdb headers */
 
 #include "lib/tdb/include/tdb.h"



More information about the samba-cvs mailing list