chiark / gitweb /
Various minor fixings.
authormdw <mdw>
Sun, 10 Apr 2005 23:38:11 +0000 (23:38 +0000)
committermdw <mdw>
Sun, 10 Apr 2005 23:38:11 +0000 (23:38 +0000)
catacomb.c
group.c

index 742ce5fb73048b9cea754ee1b454198fbc35a52e..acc0e35e382e1e15ec5cfa414890ed02f3b448cf 100644 (file)
@@ -238,7 +238,12 @@ static const PyTypeObject emptytype = { 0 };
 
 void *newtype(PyTypeObject *metaty, const PyTypeObject *skel)
 {
-  PyTypeObject *ty = (PyTypeObject *)_PyObject_GC_Malloc(metaty, 0);
+  PyTypeObject *ty =
+#if PY_VERSION_HEX < 0x02030000
+    (PyTypeObject *)_PyObject_GC_Malloc(metaty, 0);
+#else
+    (PyTypeObject *)_PyObject_GC_Malloc(_PyObject_VAR_SIZE(metaty, 0));
+#endif
   if (!skel) skel = &emptytype;
   memcpy(ty, skel, sizeof(*skel));
   if (ty->tp_base) Py_INCREF(ty->tp_base);
diff --git a/group.c b/group.c
index 9049bba849a41dc2d4742be94955b4c9e264aa10..f3a01abc61bfcdbd5bb8442bf90a9e0316cd0256 100644 (file)
--- a/group.c
+++ b/group.c
@@ -1323,7 +1323,7 @@ static PyMethodDef methods[] = {
   METH (_DHInfo__groupn,       0)
   METH (_BinDHInfo__groupn,    0)
   KWMETH(_DHInfo_generate,     "\
-generate(PBITS, [qbits = 0, event = pgen_nullev,
+generate(PBITS, [qbits = 0, event = pgen_nullev,\n\
          rng = rand, nsteps = 0]) -> D")
   KWMETH(_DHInfo_genlimlee,    "\
 genlimlee(PBITS, QBITS, [event = pgen_nullev, ievent = pgen_nullev,\n\