[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] applications/PyHLA/hla _omt/basicdata.cpp _omt/...
From: |
certi-cvs |
Subject: |
[certi-cvs] applications/PyHLA/hla _omt/basicdata.cpp _omt/... |
Date: |
Sun, 12 Oct 2008 13:31:14 +0000 |
CVSROOT: /sources/certi
Module name: applications
Changes by: Petr Gotthard <gotthardp> 08/10/12 13:31:14
Modified files:
PyHLA/hla/_omt : basicdata.cpp module.cpp
PyHLA/hla/_rti : rtiambassador.cpp
Log message:
Remove Python 2.5 functions. Now compilable also with Python 2.4.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/hla/_omt/basicdata.cpp?cvsroot=certi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/hla/_omt/module.cpp?cvsroot=certi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/hla/_rti/rtiambassador.cpp?cvsroot=certi&r1=1.3&r2=1.4
Patches:
Index: _omt/basicdata.cpp
===================================================================
RCS file: /sources/certi/applications/PyHLA/hla/_omt/basicdata.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- _omt/basicdata.cpp 25 Sep 2008 17:17:31 -0000 1.1
+++ _omt/basicdata.cpp 12 Oct 2008 13:31:13 -0000 1.2
@@ -11,7 +11,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * $Id: basicdata.cpp,v 1.1 2008/09/25 17:17:31 gotthardp Exp $
+ * $Id: basicdata.cpp,v 1.2 2008/10/12 13:31:13 gotthardp Exp $
*/
// note: you must include Python.h before any standard headers are included
@@ -132,8 +132,8 @@
{
const char *buffer;
int size;
- Py_ssize_t offset = 0;
- if(!PyArg_ParseTuple(args, "s#|n", &buffer, &size, &offset))
+ long int offset = 0;
+ if(!PyArg_ParseTuple(args, "s#|l", &buffer, &size, &offset))
return NULL;
if(size-offset < (int)sizeof(T)) {
PyErr_Format(PyExc_TypeError, "need at least %d bytes",
offset+sizeof(T));
@@ -144,11 +144,11 @@
}
static PyObject *
-createObjectSizeTuple(PyObject *object, size_t size)
+createObjectSizeTuple(PyObject *object, long int size)
{
return PyTuple_Pack(2,
object,
- PyInt_FromSize_t(size));
+ PyInt_FromLong(size));
}
/*
@@ -581,4 +581,4 @@
add_encoding(dict, pos->co_name, pos->co_size, pos->co_methods);
}
-// $Id: basicdata.cpp,v 1.1 2008/09/25 17:17:31 gotthardp Exp $
+// $Id: basicdata.cpp,v 1.2 2008/10/12 13:31:13 gotthardp Exp $
Index: _omt/module.cpp
===================================================================
RCS file: /sources/certi/applications/PyHLA/hla/_omt/module.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- _omt/module.cpp 25 Sep 2008 17:17:32 -0000 1.1
+++ _omt/module.cpp 12 Oct 2008 13:31:13 -0000 1.2
@@ -11,15 +11,13 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * $Id: module.cpp,v 1.1 2008/09/25 17:17:32 gotthardp Exp $
+ * $Id: module.cpp,v 1.2 2008/10/12 13:31:13 gotthardp Exp $
*/
// note: you must include Python.h before any standard headers are included
#include <Python.h>
#include <structmember.h>
-#include <expat.h>
-
#include "module.h"
DataInitializer::DataInitializerList DataInitializer::m_initializers;
@@ -65,4 +63,4 @@
DataInitializer::init(module);
}
-// $Id: module.cpp,v 1.1 2008/09/25 17:17:32 gotthardp Exp $
+// $Id: module.cpp,v 1.2 2008/10/12 13:31:13 gotthardp Exp $
Index: _rti/rtiambassador.cpp
===================================================================
RCS file: /sources/certi/applications/PyHLA/hla/_rti/rtiambassador.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- _rti/rtiambassador.cpp 9 Oct 2008 16:50:58 -0000 1.3
+++ _rti/rtiambassador.cpp 12 Oct 2008 13:31:14 -0000 1.4
@@ -11,7 +11,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * $Id: rtiambassador.cpp,v 1.3 2008/10/09 16:50:58 gotthardp Exp $
+ * $Id: rtiambassador.cpp,v 1.4 2008/10/12 13:31:14 gotthardp Exp $
*/
// note: you must include Python.h before any standard headers are included
@@ -1645,7 +1645,7 @@
RTI::ULong numberOfExtents = PySequence_Size(theDimensions);
RTI::Region *regionData = self->ob_rtia->createRegion(theSpace,
numberOfExtents);
- for (Py_ssize_t pos = 0; pos < numberOfExtents; pos++) {
+ for (RTI::ULong pos = 0; pos < numberOfExtents; pos++) {
RTI::DimensionHandle dimension;
unsigned long lowerBound;
unsigned long upperBound;
@@ -3123,4 +3123,4 @@
PyModule_AddObject(module, "RTIAmbassador", (PyObject
*)&RTIAmbassadorObjectType);
}
-// $Id: rtiambassador.cpp,v 1.3 2008/10/09 16:50:58 gotthardp Exp $
+// $Id: rtiambassador.cpp,v 1.4 2008/10/12 13:31:14 gotthardp Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] applications/PyHLA/hla _omt/basicdata.cpp _omt/...,
certi-cvs <=