From 7545cdf9f3e13c9d65edbedc8a739c812a38e82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= Date: Thu, 4 Aug 2011 10:29:45 +0200 Subject: [PATCH] Updato use new 'git_signature_new' prototype --- pygit2.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pygit2.c b/pygit2.c index 37a3c24..1963ef0 100644 --- a/pygit2.c +++ b/pygit2.c @@ -522,23 +522,22 @@ build_person(const git_signature *signature) } static int -signature_converter(PyObject *value, git_signature **out) +signature_converter(PyObject *value, git_signature **signature) { char *name, *email; long long time; int offset; - git_signature *signature; + int err; if (!PyArg_ParseTuple(value, "ssLi", &name, &email, &time, &offset)) return 0; - signature = git_signature_new(name, email, time, offset); - if (signature == NULL) { - PyErr_SetNone(PyExc_MemoryError); + err = git_signature_new(signature, name, email, time, offset); + if (err < 0) { + Error_set(err); return 0; } - *out = signature; return 1; }