Skip to content

Commit

Permalink
fixup! note: lazily get all information about notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
herrerog committed Nov 25, 2019
1 parent 0413b19 commit 736a94a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/note.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Note_dealloc(Note *self)
Py_CLEAR(self->id);
if (self->note != NULL)
git_note_free(self->note);
free(self->ref);
PyObject_Del(self);
}

Expand Down Expand Up @@ -234,7 +235,7 @@ wrap_note(Repository* repo, git_oid* note_id, git_oid* annotated_id, const char*
return Error_set(err);
py_note->id = git_oid_to_python(git_note_id(py_note->note));
}
py_note->ref = ref;
py_note->ref = strdup(ref);

return (PyObject*) py_note;
}
Expand Down
2 changes: 1 addition & 1 deletion src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ typedef struct {
git_note *note;
PyObject* annotated_id;
PyObject* id;
const char *ref;
char *ref;
} Note;

typedef struct {
Expand Down

0 comments on commit 736a94a

Please sign in to comment.