ext/rugged/rugged_commit.c in rugged-0.27.10.1 vs ext/rugged/rugged_commit.c in rugged-0.28.0
- old
+ new
@@ -647,11 +647,11 @@
rb_email_patch = rb_enc_str_new(email_patch.ptr, email_patch.size, rb_utf8_encoding());
cleanup:
xfree(opts.pathspec.strings);
- git_buf_free(&email_patch);
+ git_buf_dispose(&email_patch);
rugged_exception_check(error);
return rb_email_patch;
}
@@ -676,22 +676,22 @@
Data_Get_Struct(self, git_commit, commit);
error = git_commit_header_field(&header_field, commit, StringValueCStr(rb_field));
if (error < 0) {
- git_buf_free(&header_field);
+ git_buf_dispose(&header_field);
if (error == GIT_ENOTFOUND)
return Qnil;
rugged_exception_check(error);
}
encoding_name = git_commit_message_encoding(commit);
if (encoding_name != NULL)
encoding = rb_enc_find(encoding_name);
rb_result = rb_enc_str_new(header_field.ptr, header_field.size, encoding);
- git_buf_free(&header_field);
+ git_buf_dispose(&header_field);
return rb_result;
}
/*
* call-seq:
@@ -739,12 +739,12 @@
rugged_exception_check(error);
field = NIL_P(rb_field) ? NULL : StringValueCStr(rb_field);
error = git_commit_extract_signature(&signature, &signed_data, repo, &commit_id, field);
if (error < 0) {
- git_buf_free(&signature);
- git_buf_free(&signed_data);
+ git_buf_dispose(&signature);
+ git_buf_dispose(&signed_data);
}
if (error == GIT_ENOTFOUND && giterr_last()->klass == GITERR_OBJECT ) {
ret = Qnil;
} else {
@@ -752,12 +752,12 @@
ret = rb_ary_new3(2, rb_str_new(signature.ptr, signature.size),
rb_str_new(signed_data.ptr, signed_data.size));
}
- git_buf_free(&signature);
- git_buf_free(&signed_data);
+ git_buf_dispose(&signature);
+ git_buf_dispose(&signed_data);
return ret;
}
/*
@@ -819,10 +819,10 @@
rb_exc_raise(commit_data.rb_err_obj);
rugged_exception_check(error);
ret = rb_str_new_utf8(buf.ptr);
- git_buf_free(&buf);
+ git_buf_dispose(&buf);
return ret;
}
/*