~mdw
/
pyke
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
algorithms.c: Add support for Poly1305.
[pyke]
/
catacomb-python.h
diff --git
a/catacomb-python.h
b/catacomb-python.h
index
5c012ef
..
0949562
100644
(file)
--- a/
catacomb-python.h
+++ b/
catacomb-python.h
@@
-62,6
+62,7
@@
#include <catacomb/gmac.h>
#include <catacomb/md5.h>
#include <catacomb/md5-hmac.h>
#include <catacomb/gmac.h>
#include <catacomb/md5.h>
#include <catacomb/md5-hmac.h>
+#include <catacomb/poly1305.h>
#include <catacomb/sha.h>
#include <catacomb/sha-mgf.h>
#include <catacomb/sha-hmac.h>
#include <catacomb/sha.h>
#include <catacomb/sha-mgf.h>
#include <catacomb/sha-hmac.h>
@@
-155,10
+156,11
@@
#define root_pytype 0
#define type_pytype &PyType_Type
#define root_pytype 0
#define type_pytype &PyType_Type
-#define INITTYPE
(ty, base) do {
\
+#define INITTYPE
_META(ty, base, meta) do {
\
ty##_pytype_skel.tp_base = base##_pytype; \
ty##_pytype_skel.tp_base = base##_pytype; \
- ty##_pytype = inittype(&ty##_pytype_skel
);
\
+ ty##_pytype = inittype(&ty##_pytype_skel
, meta##_pytype);
\
} while (0)
} while (0)
+#define INITTYPE(ty, base) INITTYPE_META(ty, base, type)
#define INSERT(name, ob) do { \
PyObject *_o = (PyObject *)(ob); \
#define INSERT(name, ob) do { \
PyObject *_o = (PyObject *)(ob); \
@@
-246,7
+248,7
@@
extern void *newtype(PyTypeObject *, const PyTypeObject *, const char *);
extern PyObject *mkexc(PyObject *, PyObject *, const char *, PyMethodDef *);
extern void typeready(PyTypeObject *);
extern PyObject *mkexc(PyObject *, PyObject *, const char *, PyMethodDef *);
extern void typeready(PyTypeObject *);
-extern PyTypeObject *inittype(PyTypeObject *);
+extern PyTypeObject *inittype(PyTypeObject *
, PyTypeObject *
);
extern void addmethods(const PyMethodDef *);
extern PyMethodDef *donemethods(void);
extern void addmethods(const PyMethodDef *);
extern PyMethodDef *donemethods(void);