]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Specify default arguments only when compiling C++.
authorsmccam <smccam@e59a4935-1847-0410-ae03-e826735625c1>
Thu, 1 Apr 2010 20:01:52 +0000 (20:01 +0000)
committersmccam <smccam@e59a4935-1847-0410-ae03-e826735625c1>
Thu, 1 Apr 2010 20:01:52 +0000 (20:01 +0000)
Patch from Peter Collingbourne.

git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@661 e59a4935-1847-0410-ae03-e826735625c1

src/c_interface/c_interface.h

index 06486e4b24b1d7e3a99c359a062aa626bc6ab147..8e280e5da4d4c6aeccfd429d9ccc6eee41a3493b 100644 (file)
 #ifndef _cvcl__include__c_interface_h_
 #define _cvcl__include__c_interface_h_
 
+#ifdef __cplusplus
+#define _CVCL_DEFAULT_ARG(v) =v
+#else
+#define _CVCL_DEFAULT_ARG(v)
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -42,7 +48,7 @@ extern "C" {
   // h  : help
   // s  : stats
   // v  : print nodes
-  void vc_setFlags(VC vc, char c, int num_absrefine=0);
+  void vc_setFlags(VC vc, char c, int num_absrefine _CVCL_DEFAULT_ARG(0));
 
   //! Flags can be NULL
   VC vc_createValidityChecker(void);
@@ -154,7 +160,7 @@ extern "C" {
   //! Prints asserts to stdout. The flag simplify_print must be set to
   //"1" if you wish simplification to occur dring printing. It must be
   //set to "0" otherwise
-  void vc_printAsserts(VC vc, int simplify_print=0);
+  void vc_printAsserts(VC vc, int simplify_print _CVCL_DEFAULT_ARG(0));
 
   //! Prints the state of the query to malloc'd buffer '*buf' and
   //stores ! the length of the buffer to '*len'.  It is the
@@ -176,7 +182,7 @@ extern "C" {
 
   //! Assert a new formula in the current context.
   /*! The formula must have Boolean type. */
-  void vc_assertFormula(VC vc, Expr e, int absrefine_bucket_num=0);
+  void vc_assertFormula(VC vc, Expr e, int absrefine_bucket_num _CVCL_DEFAULT_ARG(0));
 
   //! Simplify e with respect to the current context
   Expr vc_simplify(VC vc, Expr e);
@@ -427,6 +433,8 @@ extern "C" {
 }
 #endif
 
+#undef _CVCL_DEFAULT_ARG
+
 #endif