comparison PyTypeInterface.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 94d09b4027aa
children c1e4f706ca9a
comparison
equal deleted inserted replaced
45:91d6cfd22883 46:af9c4cee95a8
309 return 0; 309 return 0;
310 } 310 }
311 } 311 }
312 312
313 // convert the first element of iterable sequences 313 // convert the first element of iterable sequences
314 if (PySequence_Check(pyValue) and PySequence_Size(pyValue) > 0) 314 if (PySequence_Check(pyValue) && PySequence_Size(pyValue) > 0)
315 { 315 {
316 PyObject* item = PySequence_GetItem(pyValue,0); 316 PyObject* item = PySequence_GetItem(pyValue,0);
317 if (item) 317 if (item)
318 { 318 {
319 size_t rValue = this->PyValue_To_Long(item); 319 size_t rValue = this->PyValue_To_Long(item);