ext/yarp/extension.c in yarp-0.7.0 vs ext/yarp/extension.c in yarp-0.8.0

- old
+ new

@@ -64,11 +64,11 @@ yp_parser_init(&parser, yp_string_source(input), yp_string_length(input), filepath); yp_node_t *node = yp_parse(&parser); yp_serialize(&parser, node, &buffer); - VALUE result = rb_str_new(buffer.value, buffer.length); + VALUE result = rb_str_new(yp_buffer_value(&buffer), yp_buffer_length(&buffer)); yp_node_destroy(&parser, node); yp_buffer_free(&buffer); yp_parser_free(&parser); return result; @@ -481,10 +481,10 @@ const char *checked = check_string(filepath); if (!yp_string_mapped_init(&input, checked)) return Qnil; yp_parse_serialize(yp_string_source(&input), yp_string_length(&input), &buffer, check_string(metadata)); - VALUE result = rb_str_new(buffer.value, buffer.length); + VALUE result = rb_str_new(yp_buffer_value(&buffer), yp_buffer_length(&buffer)); yp_buffer_free(&buffer); return result; }