/*----- Initialization ----------------------------------------------------*/
+static const struct nameval consts[] = {
+ CONST(KOPEN_READ), CONST(KOPEN_WRITE), CONST(KOPEN_NOFILE),
+ CONST(KEXP_FOREVER), CONST(KEXP_EXPIRE),
+ CONST(KF_ENCMASK), CONST(KENC_BINARY), CONST(KENC_MP), CONST(KENC_STRUCT),
+ CONST(KENC_ENCRYPT), CONST(KENC_STRING), CONST(KENC_EC),
+ CONST(KF_CATMASK), CONST(KCAT_SYMM), CONST(KCAT_PRIV), CONST(KCAT_PUB),
+ CONST(KCAT_SHARE),
+ CONST(KF_NONSECRET),
+ CONST(KF_BURN), CONST(KF_OPT),
+#define ENTRY(tag, val, str) CONSTFLAG(CF_SIGNED, KERR_##tag),
+ KEY_ERRORS(ENTRY)
+#undef ENTRY
+ { 0 }
+};
+
void key_pyinit(void)
{
INITTYPE(keyfile, root);
INSERT("KeyDataString", keydatastr_pytype);
INSERT("KeyDataStructured", keydatastruct_pytype);
INSERT("SubKeyIter", subkeyiter_pytype);
+ setconstants(mod, consts);
}
/*----- That's all, folks -------------------------------------------------*/