[Checkins] SVN: persistent/trunk/ Unhork argument passing between cPersistent and _timestamp under Py3k.
Tres Seaver
cvs-admin at zope.org
Fri Dec 14 01:51:26 UTC 2012
Log message for revision 128643:
Unhork argument passing between cPersistent and _timestamp under Py3k.
Changed:
_U persistent/trunk/
U persistent/trunk/persistent/_timestamp.c
U persistent/trunk/persistent/cPersistence.c
-=-
Modified: persistent/trunk/persistent/_timestamp.c
===================================================================
--- persistent/trunk/persistent/_timestamp.c 2012-12-14 01:11:21 UTC (rev 128642)
+++ persistent/trunk/persistent/_timestamp.c 2012-12-14 01:51:26 UTC (rev 128643)
@@ -462,7 +462,11 @@
int len = 0, y, mo, d, h = 0, m = 0;
double sec = 0;
- if (PyArg_ParseTuple(args, "s#:TimeStamp", &buf, &len))
+#ifdef PY3K
+ if (PyArg_ParseTuple(args, "y#", &buf, &len))
+#else
+ if (PyArg_ParseTuple(args, "s#", &buf, &len))
+#endif
{
if (len != 8)
{
Modified: persistent/trunk/persistent/cPersistence.c
===================================================================
--- persistent/trunk/persistent/cPersistence.c 2012-12-14 01:11:21 UTC (rev 128642)
+++ persistent/trunk/persistent/cPersistence.c 2012-12-14 01:51:26 UTC (rev 128643)
@@ -1100,9 +1100,15 @@
return Py_None;
}
+#ifdef PY3K
+ t = PyObject_CallFunction(TimeStamp, "y#", self->serial, 8);
+#else
t = PyObject_CallFunction(TimeStamp, "s#", self->serial, 8);
+#endif
if (!t)
+ {
return NULL;
+ }
v = PyObject_CallMethod(t, "timeTime", "");
Py_DECREF(t);
return v;
More information about the checkins
mailing list