Fix: "and" is not available in all compilers.
This commit is contained in:
parent
1a34e412a5
commit
d9c2ec696d
2 changed files with 5 additions and 5 deletions
|
|
@ -90,7 +90,7 @@ int py_str_to(PyObject *strobj, const char* &strref){
|
|||
|
||||
static
|
||||
int py_int_to(PyObject *intobj, int64_t & val){
|
||||
if (!PyInt_Check(intobj) and !PyLong_Check(intobj)) {
|
||||
if (!PyInt_Check(intobj) && !PyLong_Check(intobj)) {
|
||||
// raise TypeError
|
||||
PyErr_SetString(PyExc_TypeError, "Expecting an int");
|
||||
return 0;
|
||||
|
|
@ -111,7 +111,7 @@ int py_int_to(PyObject *intobj, int64_t & val){
|
|||
|
||||
static
|
||||
int py_int_to(PyObject *intobj, unsigned & val){
|
||||
if (!PyInt_Check(intobj) and !PyLong_Check(intobj)) {
|
||||
if (!PyInt_Check(intobj) && !PyLong_Check(intobj)) {
|
||||
// raise TypeError
|
||||
PyErr_SetString(PyExc_TypeError, "Expecting an int");
|
||||
return 0;
|
||||
|
|
@ -123,7 +123,7 @@ int py_int_to(PyObject *intobj, unsigned & val){
|
|||
|
||||
static
|
||||
int py_int_to(PyObject *intobj, unsigned long long & val){
|
||||
if (!PyInt_Check(intobj) and !PyLong_Check(intobj)) {
|
||||
if (!PyInt_Check(intobj) && !PyLong_Check(intobj)) {
|
||||
// raise TypeError;
|
||||
PyErr_SetString(PyExc_TypeError, "Expecting an int");
|
||||
return 0;
|
||||
|
|
@ -148,7 +148,7 @@ int py_int_to(PyObject *intobj, unsigned long & val){
|
|||
|
||||
static
|
||||
int py_int_to(PyObject *intobj, void* & val){
|
||||
if (!PyInt_Check(intobj) and !PyLong_Check(intobj)) {
|
||||
if (!PyInt_Check(intobj) && !PyLong_Check(intobj)) {
|
||||
// raise TypeError
|
||||
PyErr_SetString(PyExc_TypeError, "Expecting an int");
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ struct extract {
|
|||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
if (accept_null and Py_None == *item) {
|
||||
if (accept_null && Py_None == *item) {
|
||||
vec.push_back(NULL);
|
||||
} else {
|
||||
auto_pyobject capsule = PyObject_GetAttrString(*item, "_ptr");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue