From d14393c1df1e7e3e0f7c9d1fa019ef4d5bfa4eac Mon Sep 17 00:00:00 2001 From: Nico von Geyso Date: Wed, 30 May 2012 07:28:35 +0200 Subject: [PATCH] Diff and Hunk should not inherit from _libgit2.Object --- src/pygit2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/pygit2.c b/src/pygit2.c index 7e1ad75..6153578 100644 --- a/src/pygit2.c +++ b/src/pygit2.c @@ -131,12 +131,6 @@ moduleinit(PyObject* m) CommitType.tp_base = &ObjectType; if (PyType_Ready(&CommitType) < 0) return NULL; - DiffType.tp_base = &ObjectType; - if (PyType_Ready(&DiffType) < 0) - return NULL; - HunkType.tp_base = &ObjectType; - if (PyType_Ready(&HunkType) < 0) - return NULL; TreeType.tp_base = &ObjectType; if (PyType_Ready(&TreeType) < 0) return NULL; @@ -147,6 +141,11 @@ moduleinit(PyObject* m) if (PyType_Ready(&TagType) < 0) return NULL; + if (PyType_Ready(&DiffType) < 0) + return NULL; + if (PyType_Ready(&HunkType) < 0) + return NULL; + TreeEntryType.tp_new = PyType_GenericNew; if (PyType_Ready(&TreeEntryType) < 0) return NULL;