.tp_name = "Registry",
.tp_methods = registry_methods,
.tp_new = registry_new,
- .tp_basicsize = sizeof(pytalloc_Object),
.tp_flags = Py_TPFLAGS_DEFAULT,
};
.tp_name = "HiveKey",
.tp_methods = hive_key_methods,
.tp_new = hive_new,
- .tp_basicsize = sizeof(pytalloc_Object),
.tp_flags = Py_TPFLAGS_DEFAULT,
};
PyTypeObject PyRegistryKey = {
.tp_name = "RegistryKey",
- .tp_basicsize = sizeof(pytalloc_Object),
.tp_flags = Py_TPFLAGS_DEFAULT,
};
void initregistry(void)
{
PyObject *m;
- PyTypeObject *talloc_type = pytalloc_GetObjectType();
- if (talloc_type == NULL)
+ if (pytalloc_BaseObject_PyType_Ready(&PyHiveKey) < 0)
return;
- PyHiveKey.tp_base = talloc_type;
- PyRegistry.tp_base = talloc_type;
- PyRegistryKey.tp_base = talloc_type;
-
- if (PyType_Ready(&PyHiveKey) < 0)
- return;
-
- if (PyType_Ready(&PyRegistry) < 0)
+ if (pytalloc_BaseObject_PyType_Ready(&PyRegistry) < 0)
return;
- if (PyType_Ready(&PyRegistryKey) < 0)
+ if (pytalloc_BaseObject_PyType_Ready(&PyRegistryKey) < 0)
return;
m = Py_InitModule3("registry", py_registry_methods, "Registry");