From 3302721c653fe4bc255481c512842f8ad97bf798 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 2 Mar 2014 19:26:37 +0900 Subject: [PATCH] catch up to xrope API change --- src/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/string.c b/src/string.c index 9dc31975..b7c4d7d1 100644 --- a/src/string.c +++ b/src/string.c @@ -25,7 +25,7 @@ pic_str_new(pic_state *pic, const char *imbed, size_t len) if (imbed == NULL && len > 0) { pic_errorf(pic, "zero length specified against NULL ptr"); } - return str_new_rope(pic, xr_new_volatile(imbed, len)); + return str_new_rope(pic, xr_new_copy(imbed, len)); } pic_str * @@ -84,7 +84,7 @@ xr_put(xrope *rope, size_t i, char c) buf[0] = c; x = xr_sub(rope, 0, i); - y = xr_new_volatile(buf, 1); + y = xr_new_copy(buf, 1); rope = xr_cat(x, y); XROPE_DECREF(x); XROPE_DECREF(y);