Base: remove Py2 code
This commit is contained in:
@@ -350,11 +350,7 @@ Py::Object ParameterGrpPy::getInt(const Py::Tuple& args)
|
||||
int Int=0;
|
||||
if (!PyArg_ParseTuple(args.ptr(), "s|i", &pstr,&Int))
|
||||
throw Py::Exception();
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
return Py::Int(_cParamGrp->GetInt(pstr,Int));
|
||||
#else
|
||||
return Py::Long(_cParamGrp->GetInt(pstr,Int));
|
||||
#endif
|
||||
}
|
||||
|
||||
Py::Object ParameterGrpPy::getInts(const Py::Tuple& args)
|
||||
@@ -389,12 +385,7 @@ Py::Object ParameterGrpPy::getUnsigned(const Py::Tuple& args)
|
||||
unsigned int UInt=0;
|
||||
if (!PyArg_ParseTuple(args.ptr(), "s|I", &pstr,&UInt))
|
||||
throw Py::Exception();
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyObject* val = Py_BuildValue("I",_cParamGrp->GetUnsigned(pstr,UInt));
|
||||
return Py::asObject(val);
|
||||
#else
|
||||
return Py::Long(_cParamGrp->GetUnsigned(pstr,UInt));
|
||||
#endif
|
||||
}
|
||||
|
||||
Py::Object ParameterGrpPy::getUnsigneds(const Py::Tuple& args)
|
||||
@@ -660,11 +651,7 @@ Py::Object ParameterGrpPy::getContents(const Py::Tuple& args)
|
||||
Py::Tuple t3(3);
|
||||
t3.setItem(0,Py::String("Integer"));
|
||||
t3.setItem(1,Py::String(It3->first.c_str()));
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
t3.setItem(2,Py::Int(It3->second));
|
||||
#else
|
||||
t3.setItem(2,Py::Long(It3->second));
|
||||
#endif
|
||||
list.append(t3);
|
||||
}
|
||||
|
||||
@@ -694,11 +681,7 @@ Py::Object ParameterGrpPy::getContents(const Py::Tuple& args)
|
||||
Py::Tuple t6(3);
|
||||
t6.setItem(0,Py::String("Unsigned Long"));
|
||||
t6.setItem(1,Py::String(It6->first.c_str()));
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
t6.setItem(2,Py::asObject(Py_BuildValue("I",It6->second)));
|
||||
#else
|
||||
t6.setItem(2,Py::Long(It6->second));
|
||||
#endif
|
||||
list.append(t6);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user