From 2eee382a62a909d5a3f2f5eda94f30fe68fd5335 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 20 Jan 2012 13:41:10 +0000 Subject: initial import of the C runtime --- src/runtime/c/gu/str.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/runtime/c/gu/str.h (limited to 'src/runtime/c/gu/str.h') diff --git a/src/runtime/c/gu/str.h b/src/runtime/c/gu/str.h new file mode 100644 index 000000000..d40f57b08 --- /dev/null +++ b/src/runtime/c/gu/str.h @@ -0,0 +1,29 @@ +#ifndef GU_STR_H_ +#define GU_STR_H_ + +#include +#include + +extern const char gu_empty_str[]; +extern const char* const gu_null_str; + +typedef const char* GuStr; + +char* gu_new_str(size_t size, GuPool* pool); + +char* gu_strdup(const char* str, GuPool* pool); + +bool +gu_str_eq(GuStr s1, GuStr s2); + +extern GuHasher gu_str_hasher[1]; + +#include + +extern GU_DECLARE_TYPE(GuStr, repr); + +char* gu_vasprintf(const char* fmt, va_list args, GuPool* pool); + +char* gu_asprintf(GuPool* pool, const char* fmt, ...); + +#endif // GU_STR_H_ -- cgit v1.2.3