comparison PyTypeInterface.cpp @ 35:2ba482378038 vampy2

* Fix compile error with VC++. I am totally at a loss to explain why this should have compiled with any other compiler! * Update VC project file. This code does now build with VC++ without HAVE_NUMPY -- I haven't installed Numpy yet
author cannam
date Thu, 24 Sep 2009 08:52:04 +0000
parents c905122f79e7
children
comparison
equal deleted inserted replaced
34:c905122f79e7 35:2ba482378038
106 Py_DECREF(pyFloat); 106 Py_DECREF(pyFloat);
107 return rValue; 107 return rValue;
108 } 108 }
109 109
110 // convert the first element of any iterable sequence (for convenience and backwards compatibility) 110 // convert the first element of any iterable sequence (for convenience and backwards compatibility)
111 if (PySequence_Check(pyValue) and PySequence_Size(pyValue) > 0) 111 if (PySequence_Check(pyValue) && PySequence_Size(pyValue) > 0)
112 { 112 {
113 PyObject* item = PySequence_GetItem(pyValue,0); 113 PyObject* item = PySequence_GetItem(pyValue,0);
114 if (item) 114 if (item)
115 { 115 {
116 float rValue = this->PyValue_To_Float(item); 116 float rValue = this->PyValue_To_Float(item);
186 return 0; 186 return 0;
187 } 187 }
188 } 188 }
189 189
190 // convert the first element of iterable sequences 190 // convert the first element of iterable sequences
191 if (PySequence_Check(pyValue) and PySequence_Size(pyValue) > 0) 191 if (PySequence_Check(pyValue) && PySequence_Size(pyValue) > 0)
192 { 192 {
193 PyObject* item = PySequence_GetItem(pyValue,0); 193 PyObject* item = PySequence_GetItem(pyValue,0);
194 if (item) 194 if (item)
195 { 195 {
196 size_t rValue = this->PyValue_To_Size_t(item); 196 size_t rValue = this->PyValue_To_Size_t(item);