xrope is now the internal representation of pic_str
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user