comparison PyParameterDescriptor.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 c1e4f706ca9a
comparison
equal deleted inserted replaced
45:91d6cfd22883 46:af9c4cee95a8
36 if (self == NULL) return NULL; 36 if (self == NULL) return NULL;
37 self->dict = PyDict_New(); 37 self->dict = PyDict_New();
38 if (self->dict == NULL) return NULL; 38 if (self->dict == NULL) return NULL;
39 39
40 /// allow copying objects 40 /// allow copying objects
41 if (args and PyTuple_Size(args) == 1) { 41 if (args && PyTuple_Size(args) == 1) {
42 PyObject* arg = PyTuple_GET_ITEM(args,0); 42 PyObject* arg = PyTuple_GET_ITEM(args,0);
43 if (PyParameterDescriptor_CheckExact(arg)) 43 if (PyParameterDescriptor_CheckExact(arg))
44 PyDict_Merge(self->dict,PyParameterDescriptor_AS_DICT(arg),0); 44 PyDict_Merge(self->dict,PyParameterDescriptor_AS_DICT(arg),0);
45 else if (PyDict_CheckExact(arg)) 45 else if (PyDict_CheckExact(arg))
46 PyDict_Merge(self->dict,arg,0); 46 PyDict_Merge(self->dict,arg,0);