xrope is now the internal representation of pic_str

This commit is contained in:
Yuichi Nishiwaki
2014-02-27 21:54:37 +09:00
parent 8e511bc410
commit 8586dc9057
11 changed files with 85 additions and 56 deletions
+1
View File
@@ -36,6 +36,7 @@ extern "C" {
#include "xhash/xhash.h"
#include "xfile/xfile.h"
#include "xrope/xrope.h"
#if __STDC_VERSION__ >= 201112L
# define NORETURN _Noreturn
+3 -2
View File
@@ -11,8 +11,7 @@ extern "C" {
struct pic_string {
PIC_OBJECT_HEADER
char *str;
size_t len;
xrope *rope;
};
#define pic_str_p(v) (pic_type(v) == PIC_TT_STRING)
@@ -30,6 +29,8 @@ pic_str *pic_strcat(pic_state *, pic_str *, pic_str *);
pic_str *pic_substr(pic_state *, pic_str *, size_t, size_t);
int pic_strcmp(pic_str *, pic_str *);
const char *pic_str_cstr(pic_str *);
pic_value pic_format(pic_state *, const char *, ...);
pic_value pic_vformat(pic_state *, const char *, va_list);
pic_value pic_vfformat(pic_state *, xFILE *, const char *, va_list);