- static const struct { const char *name; unsigned long value; } consts[] = {
-#define C(x) { #x, x }
- C(FTY_PRIME), C(FTY_BINARY),
- C(PGEN_PASS), C(PGEN_FAIL), C(PGEN_BEGIN), C(PGEN_TRY), C(PGEN_DONE),
- C(PGEN_ABORT),
- C(MPW_MAX),
- C(PMODE_READ), C(PMODE_VERIFY),
- C(KOPEN_READ), C(KOPEN_WRITE), C(KOPEN_NOFILE),
- C(KEXP_FOREVER), C(KEXP_EXPIRE),
- C(KF_ENCMASK), C(KENC_BINARY), C(KENC_MP), C(KENC_STRUCT),
- C(KENC_ENCRYPT), C(KENC_STRING), C(KENC_EC),
- C(KF_CATMASK), C(KCAT_SYMM), C(KCAT_PRIV), C(KCAT_PUB), C(KCAT_SHARE),
- C(KF_NONSECRET),
- C(KF_BURN), C(KF_OPT),
-#define ENTRY(tag, val, str) C(KERR_##tag),
- KEY_ERRORS(ENTRY)
-#undef ENTRY
-#undef C
- { 0 }
- };
- int i;
- PyObject *x;
-
- for (i = 0; consts[i].name; i++) {
- if (consts[i].value > LONG_MAX)
- x = PyLong_FromUnsignedLong(consts[i].value);
- else
- x = PyInt_FromLong(consts[i].value);
- PyModule_AddObject(mod, (/*unconst*/ char *)consts[i].name, x);
+ size_t i = 0, o, n;
+ int flat;
+ PyObject *qq = 0, *x = 0, *y = 0, *z = 0, *it = 0;
+ char *v = 0;
+
+ if (PyTuple_Size(arg) == 1) arg = PyTuple_GET_ITEM(arg, 0);
+ it = PyObject_GetIter(arg); if (!it) goto end;
+ qq = PyIter_Next(it);
+ if (!qq) {
+ if (!PyErr_Occurred()) z = id(me);
+ else goto end;