Mercurial > hg
diff mercurial/mpatch.c @ 29749:155f0cc3f813
mpatch: raise MemoryError instead of mpatchError if lalloc() failed
MemoryError is handled differently in dispatch._runcatch().
Since mpatch_errors[] isn't that useful now, I've changed it to a simple
switch statement.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 07 Aug 2016 10:06:56 +0900 |
parents | 9a1685c70db4 |
children | 347c0f4232e1 |
line wrap: on
line diff
--- a/mercurial/mpatch.c Sun Aug 07 18:09:58 2016 -0700 +++ b/mercurial/mpatch.c Sun Aug 07 10:06:56 2016 +0900 @@ -27,9 +27,6 @@ #include "compat.h" #include "mpatch.h" -char *mpatch_errors[] = {NULL, "invalid patch", "patch cannot be decoded", - "no memory"}; - static struct mpatch_flist *lalloc(ssize_t size) { struct mpatch_flist *a = NULL;