22 lines
543 B
C
22 lines
543 B
C
#ifndef _BLUELIB_STRING_H_
|
|
#define _BLUELIB_STRING_H_
|
|
|
|
#include "object.h"
|
|
|
|
/* maximum length of string that can be stored inline, not including null-terminator */
|
|
#define STRING_INLINE_CAPACITY 15
|
|
|
|
struct b_string {
|
|
struct b_object s_base;
|
|
/* length of string, not including null-terminator */
|
|
unsigned int s_len;
|
|
/* maximum length of string storable in the currently-allocated buffer, not including null terminator */
|
|
unsigned int s_max;
|
|
union {
|
|
char d_inline[STRING_INLINE_CAPACITY + 1];
|
|
char *d_BLUE_APIal;
|
|
} s_data;
|
|
};
|
|
|
|
#endif
|