~mdw
/
pyke
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(Pruned history of `catacomb-python' begins here.)
[pyke]
/
catacomb.c
diff --git
a/catacomb.c
b/catacomb.c
index
e868f0f
..
b54227f
100644
(file)
--- a/
catacomb.c
+++ b/
catacomb.c
@@
-74,8
+74,8
@@
PyObject *mexp_common(PyObject *me, PyObject *arg,
PyObject *qq, *x, *y, *z = 0;
char *v = 0, *vv;
PyObject *qq, *x, *y, *z = 0;
char *v = 0, *vv;
- if (PyTuple_
Size
(arg) == 1)
- arg = PyTuple_G
etItem
(arg, 0);
+ if (PyTuple_
GET_SIZE
(arg) == 1)
+ arg = PyTuple_G
ET_ITEM
(arg, 0);
Py_INCREF(arg);
if (!PySequence_Check(arg)) TYERR("not a sequence");
n = PySequence_Size(arg); if (n < 0) goto end;
Py_INCREF(arg);
if (!PySequence_Check(arg)) TYERR("not a sequence");
n = PySequence_Size(arg); if (n < 0) goto end;
@@
-135,7
+135,7
@@
static PyObject *smallprimes(void)
int i;
for (i = 0; i < NPRIME; i++)
int i;
for (i = 0; i < NPRIME; i++)
- PyList_S
etItem
(v, i, PyInt_FromLong(primetab[i]));
+ PyList_S
ET_ITEM
(v, i, PyInt_FromLong(primetab[i]));
return (v);
}
return (v);
}
@@
-151,14
+151,14
@@
static PyObject *meth__ego(PyObject *me, PyObject *arg)
static PyMethodDef methods[] = {
#define METHNAME(func) meth_##func
static PyMethodDef methods[] = {
#define METHNAME(func) meth_##func
- METH (_ego,
"_ego(ARGV0)")
+ METH (_ego, "_ego(ARGV0)")
#undef METHNAME
{ 0 }
};
static void init_random(void)
{
#undef METHNAME
{ 0 }
};
static void init_random(void)
{
-#if PY_
MAJOR_VERSION >= 3 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 6)
+#if PY_
VERSION_HEX >= 0x02060000
char *seed;
uint32 r;
char *seed;
uint32 r;
@@
-174,6
+174,8
@@
static void init_random(void)
EXPORT void init_base(void)
{
PyObject *mod;
EXPORT void init_base(void)
{
PyObject *mod;
+
+ modname = PyString_FromString("catacomb");
addmethods(methods);
INIT_MODULES;
init_random();
addmethods(methods);
INIT_MODULES;
init_random();