Updato use new 'git_signature_new' prototype
This commit is contained in:
11
pygit2.c
11
pygit2.c
@@ -522,23 +522,22 @@ build_person(const git_signature *signature)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
signature_converter(PyObject *value, git_signature **out)
|
signature_converter(PyObject *value, git_signature **signature)
|
||||||
{
|
{
|
||||||
char *name, *email;
|
char *name, *email;
|
||||||
long long time;
|
long long time;
|
||||||
int offset;
|
int offset;
|
||||||
git_signature *signature;
|
int err;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(value, "ssLi", &name, &email, &time, &offset))
|
if (!PyArg_ParseTuple(value, "ssLi", &name, &email, &time, &offset))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
signature = git_signature_new(name, email, time, offset);
|
err = git_signature_new(signature, name, email, time, offset);
|
||||||
if (signature == NULL) {
|
if (err < 0) {
|
||||||
PyErr_SetNone(PyExc_MemoryError);
|
Error_set(err);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = signature;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user