Correct the signature output from the reflog

The function to convert signatures into erlang terms was returning ok
with the rest of the tuple which geef_sig expects. We do not want the
ok there, so let that function give us the four terms and decide what to
do in each case.

The signature functions still want to return with ok before it, but the
reflog wants them together with the other parameters.
This commit is contained in:
Carlos Martín Nieto
2014-02-13 18:13:33 +01:00
parent 22ab293910
commit 5520efb72a
7 changed files with 35 additions and 17 deletions

View File

@@ -7,6 +7,6 @@ ERL_NIF_TERM geef_signature_new(ErlNifEnv *env, int argc, const ERL_NIF_TERM arg
ERL_NIF_TERM geef_signature_default(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
int geef_signature_from_erl(git_signature **out, ErlNifEnv *env, ERL_NIF_TERM *err, ERL_NIF_TERM term);
int geef_signature_to_erl(ERL_NIF_TERM *out, ErlNifEnv *env, const git_signature *sig);
int geef_signature_to_erl(ERL_NIF_TERM *out_name, ERL_NIF_TERM *out_email, ERL_NIF_TERM *out_time, ERL_NIF_TERM *out_offset, ErlNifEnv *env, const git_signature *sig);
#endif