diff --git a/ext/rugged/rugged_allocator.c b/ext/rugged/rugged_allocator.c index 30ee53790..0059af66f 100644 --- a/ext/rugged/rugged_allocator.c +++ b/ext/rugged/rugged_allocator.c @@ -13,58 +13,11 @@ static void *rugged_gmalloc(size_t n, const char *file, int line) return xmalloc(n); } -static void *rugged_gcalloc(size_t nelem, size_t elsize, const char *file, int line) -{ - return xcalloc(nelem, elsize); -} - -static char *rugged_gstrdup(const char *str, const char *file, int line) -{ - return ruby_strdup(str); -} - -static char *rugged_gstrndup(const char *str, size_t n, const char *file, int line) -{ - size_t len; - char *newstr; - - len = strnlen(str, n); - if (len < n) - n = len; - - newstr = xmalloc(n+1); - memcpy(newstr, str, n); - newstr[n] = '\0'; - - return newstr; -} - -static char *rugged_gsubstrdup(const char *str, size_t n, const char *file, int line) -{ - char *newstr; - - newstr = xmalloc(n+1); - memcpy(newstr, str, n); - newstr[n] = '\0'; - - return newstr; -} - static void *rugged_grealloc(void *ptr, size_t size, const char *file, int line) { return xrealloc(ptr, size); } -static void *rugged_greallocarray(void *ptr, size_t nelem, size_t elsize, const char *file, int line) -{ - return xrealloc2(ptr, nelem, elsize); -} - -static void *rugged_gmallocarray(size_t nelem, size_t elsize, const char *file, int line) -{ - return xmalloc2(nelem, elsize); -} - static void rugged_gfree(void *ptr) { xfree(ptr); @@ -75,14 +28,7 @@ void rugged_set_allocator(void) git_allocator allocator; allocator.gmalloc = rugged_gmalloc; - allocator.gcalloc = rugged_gcalloc; - allocator.gstrdup = rugged_gstrdup; - allocator.gstrndup = rugged_gstrndup; - allocator.gstrndup = rugged_gstrndup; - allocator.gsubstrdup = rugged_gsubstrdup; allocator.grealloc = rugged_grealloc; - allocator.greallocarray = rugged_greallocarray; - allocator.gmallocarray = rugged_gmallocarray; allocator.gfree = rugged_gfree; git_libgit2_opts(GIT_OPT_SET_ALLOCATOR, &allocator); diff --git a/lib/rugged/version.rb b/lib/rugged/version.rb index 56da7e4c3..b4929f5bf 100644 --- a/lib/rugged/version.rb +++ b/lib/rugged/version.rb @@ -4,5 +4,5 @@ # For full terms see the included LICENSE file. module Rugged - Version = VERSION = '1.5.0' + Version = VERSION = '1.7.1' end diff --git a/vendor/libgit2 b/vendor/libgit2 index 8f8e805e3..a2bde6374 160000 --- a/vendor/libgit2 +++ b/vendor/libgit2 @@ -1 +1 @@ -Subproject commit 8f8e805e3f37e49563c33a0c67fcf7f0d2e9101c +Subproject commit a2bde63741977ca0f4ef7db2f609df320be67a08