chiark
/
gitweb
/
~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 4e82ed628e218ef7e0ec6a34140db7a1400645e4..58d2fe7ebd7525998e4211983541b3ed5125fa6d 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);