comparison src/if_ruby.c @ 15681:ef9c89680e7f v8.1.0848

patch 8.1.0848: cannot build with Ruby 1.8 commit https://github.com/vim/vim/commit/b191be2f0000bf1de09a79226cfd405d9387caa3 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 30 21:00:12 2019 +0100 patch 8.1.0848: cannot build with Ruby 1.8 Problem: Cannot build with Ruby 1.8. (Tom G. Christensen) Solution: Use rb-str_new2(). (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/3883, closes #3884)
author Bram Moolenaar <Bram@vim.org>
date Wed, 30 Jan 2019 21:15:06 +0100
parents dd725a8ab112
children 81db86aac412
comparison
equal deleted inserted replaced
15680:78587768d8ac 15681:ef9c89680e7f
1260 char buf[4]; 1260 char buf[4];
1261 int i; 1261 int i;
1262 for (i = 0; i < RSTRING_LEN(str); i++) 1262 for (i = 0; i < RSTRING_LEN(str); i++)
1263 { 1263 {
1264 sprintf(buf, "%02X", RSTRING_PTR(str)[i]); 1264 sprintf(buf, "%02X", RSTRING_PTR(str)[i]);
1265 rb_str_concat(result, rb_str_new_cstr(buf)); 1265 rb_str_concat(result, rb_str_new2(buf));
1266 } 1266 }
1267 return result; 1267 return result;
1268 } 1268 }
1269 1269
1270 static VALUE buffer_s_current(void) 1270 static VALUE buffer_s_current(void)