diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2012-01-20 13:41:10 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2012-01-20 13:41:10 +0000 |
| commit | 2eee382a62a909d5a3f2f5eda94f30fe68fd5335 (patch) | |
| tree | b0b0d513535895f244214aebf6358e172b8dce6d /src/runtime/c/gu/str.h | |
| parent | b9728357126f8b9a6311cca17d9f0dcc2a7bfb9b (diff) | |
initial import of the C runtime
Diffstat (limited to 'src/runtime/c/gu/str.h')
| -rw-r--r-- | src/runtime/c/gu/str.h | 29 |
1 files changed, 29 insertions, 0 deletions
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 <gu/mem.h> +#include <gu/hash.h> + +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 <gu/type.h> + +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_ |
