~mdw
/
pyke
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
catacomb-python.h, util.c: Support for declaring types with weird metatypes.
[pyke]
/
util.c
diff --git
a/util.c
b/util.c
index
4e82ed6
..
58d2fe7
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-223,9
+223,9
@@
void typeready(PyTypeObject *ty)
PyDict_SetItemString(ty->tp_dict, "__module__", modname);
}
PyDict_SetItemString(ty->tp_dict, "__module__", modname);
}
-PyTypeObject *inittype(PyTypeObject *tyskel)
+PyTypeObject *inittype(PyTypeObject *tyskel
, PyTypeObject *meta
)
{
{
- PyTypeObject *ty = newtype(
&PyType_Type
, tyskel, 0);
+ PyTypeObject *ty = newtype(
meta
, tyskel, 0);
ty->tp_flags |= Py_TPFLAGS_HEAPTYPE;
typeready(ty);
return (ty);
ty->tp_flags |= Py_TPFLAGS_HEAPTYPE;
typeready(ty);
return (ty);