{ 0 }
};
-static PyTypeObject grand_pytype_skel = {
+static const PyTypeObject grand_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"GRand", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
return (grand_dopywrap(lcrand_pytype, lcrand_create(n), f_freeme));
}
-static PyTypeObject lcrand_pytype_skel = {
+static const PyTypeObject lcrand_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"LCRand", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
return (grand_dopywrap(fibrand_pytype, fibrand_create(n), f_freeme));
}
-static PyTypeObject fibrand_pytype_skel = {
+static const PyTypeObject fibrand_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"FibRand", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
{ 0 }
};
-static PyTypeObject truerand_pytype_skel = {
+static const PyTypeObject truerand_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"TrueRand", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
{ 0 }
};
-static PyTypeObject gccrand_pytype_skel = {
+static const PyTypeObject gccrand_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"GCCRand", /* @tp_name@ */
sizeof(gccrand_pyobj), /* @tp_basicsize@ */
0 /* @tp_is_gc@ */
};
-static PyTypeObject gcrand_pytype_skel = {
+static const PyTypeObject gcrand_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"GCRand", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
0 /* @tp_is_gc@ */
};
-static PyTypeObject gclatinrand_pytype_skel = {
+static const PyTypeObject gclatinrand_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"GCLatinRand", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
return (rc);
}
-static PyTypeObject sslprf_pytype_skel = {
+static const PyTypeObject sslprf_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"SSLRand", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
0 /* @tp_is_gc@ */
};
-static PyTypeObject tlsdx_pytype_skel = {
+static const PyTypeObject tlsdx_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"TLSDataExpansion", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
0 /* @tp_is_gc@ */
};
-static PyTypeObject tlsprf_pytype_skel = {
+static const PyTypeObject tlsprf_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"TLSPRF", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
{ 0 }
};
-static PyTypeObject dsarand_pytype_skel = {
+static const PyTypeObject dsarand_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"DSARand", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
{ 0 }
};
-static PyTypeObject bbs_pytype_skel = {
+static const PyTypeObject bbs_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"BlumBlumShub", /* @tp_name@ */
sizeof(grand_pyobj), /* @tp_basicsize@ */
{ 0 }
};
-static PyTypeObject bbspriv_pytype_skel = {
+static const PyTypeObject bbspriv_pytype_skel = {
PyObject_HEAD_INIT(0) 0, /* Header */
"BBSPriv", /* @tp_name@ */
sizeof(bbspriv_pyobj), /* @tp_basicsize@ */
/*----- Global stuff ------------------------------------------------------*/
+static const struct nameval consts[] = {
+ CONST(RAND_IBITS),
+ { 0 }
+};
+
void rand_pyinit(void)
{
INITTYPE(grand, root);
gccrands_dict = gccrands(); Py_INCREF(gccrands_dict);
INSERT("gccrands", gccrands_dict);
INSERT("rand", rand_pyobj);
+ setconstants(mod, consts);
}
/*----- That's all, folks -------------------------------------------------*/