diff PyExtensionModule.cpp @ 46:af9c4cee95a8

VC++ fixes. Much of this is changing "and" to "&&". I had never realised until today that "and" is in fact a keyword in C++, albeit not one that has been there since the start, so this should compile (I eventually looked this up having been puzzled by how this code could ever build with any other compiler). However, despite its keywordness, "and" still doesn't seem to be acceptable to VC++. Possibly there's an option to change this, or one could use a macro -- but why not just stick with the token that compilers are known to like?
author cannam
date Mon, 05 Oct 2009 16:14:25 +0000
parents 27bab3a16c9a
children 5664fe298af2
line wrap: on
line diff
--- a/PyExtensionModule.cpp	Mon Oct 05 13:57:10 2009 +0000
+++ b/PyExtensionModule.cpp	Mon Oct 05 16:14:25 2009 +0000
@@ -97,7 +97,7 @@
 static PyObject *
 OutputList_new(PyObject *ignored, PyObject *args)
 {
-	if (args and PyTuple_Check(args)) 
+	if (args && PyTuple_Check(args)) 
 		return PySequence_List(args);
 	else return (PyObject *) PyList_New(0);
 }
@@ -107,7 +107,7 @@
 static PyObject *
 ParameterList_new(PyObject *ignored, PyObject *args)
 {
-	if (args and PyTuple_Check(args)) 
+	if (args && PyTuple_Check(args)) 
 		return PySequence_List(args);
 	else return (PyObject *) PyList_New(0);
 }
@@ -116,7 +116,7 @@
 static PyObject *
 FeatureList_new(PyObject *ignored, PyObject *args)
 {
-	if (args and PyTuple_Check(args)) 
+	if (args && PyTuple_Check(args)) 
 		return PySequence_List(args);
 	else return (PyObject *) PyList_New(0);
 }