Mercurial > hg > vampy
comparison 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 |
comparison
equal
deleted
inserted
replaced
45:91d6cfd22883 | 46:af9c4cee95a8 |
---|---|
95 | 95 |
96 /* New PyOutputList Objects */ | 96 /* New PyOutputList Objects */ |
97 static PyObject * | 97 static PyObject * |
98 OutputList_new(PyObject *ignored, PyObject *args) | 98 OutputList_new(PyObject *ignored, PyObject *args) |
99 { | 99 { |
100 if (args and PyTuple_Check(args)) | 100 if (args && PyTuple_Check(args)) |
101 return PySequence_List(args); | 101 return PySequence_List(args); |
102 else return (PyObject *) PyList_New(0); | 102 else return (PyObject *) PyList_New(0); |
103 } | 103 } |
104 | 104 |
105 | 105 |
106 /* New PyParameterList Objects */ | 106 /* New PyParameterList Objects */ |
107 static PyObject * | 107 static PyObject * |
108 ParameterList_new(PyObject *ignored, PyObject *args) | 108 ParameterList_new(PyObject *ignored, PyObject *args) |
109 { | 109 { |
110 if (args and PyTuple_Check(args)) | 110 if (args && PyTuple_Check(args)) |
111 return PySequence_List(args); | 111 return PySequence_List(args); |
112 else return (PyObject *) PyList_New(0); | 112 else return (PyObject *) PyList_New(0); |
113 } | 113 } |
114 | 114 |
115 /* New PyFeatureList Objects */ | 115 /* New PyFeatureList Objects */ |
116 static PyObject * | 116 static PyObject * |
117 FeatureList_new(PyObject *ignored, PyObject *args) | 117 FeatureList_new(PyObject *ignored, PyObject *args) |
118 { | 118 { |
119 if (args and PyTuple_Check(args)) | 119 if (args && PyTuple_Check(args)) |
120 return PySequence_List(args); | 120 return PySequence_List(args); |
121 else return (PyObject *) PyList_New(0); | 121 else return (PyObject *) PyList_New(0); |
122 } | 122 } |
123 | 123 |
124 | 124 |