ext/curb_postfield.c in curb-0.6.6.0 vs ext/curb_postfield.c in curb-0.6.7
- old
+ new
@@ -428,10 +428,10 @@
Data_Get_Struct(self, ruby_curl_postfield, rbcpf);
if ((rbcpf->local_file == Qnil) && (rbcpf->remote_file == Qnil)) {
if (rbcpf->name != Qnil) {
- char *tmpchrs = curl_escape(RSTRING_PTR(rbcpf->name), RSTRING_LEN(rbcpf->name));
+ char *tmpchrs = curl_escape(StringValuePtr(rbcpf->name), RSTRING_LEN(StringValue(rbcpf->name)));
if (!tmpchrs) {
rb_raise(eCurlErrInvalidPostField, "Failed to url-encode name `%s'", tmpchrs);
} else {
VALUE tmpcontent = Qnil;