ability to generate shared library and h file

This commit is contained in:
Andrew Kelley
2015-11-29 17:28:28 -07:00
parent f4721857ed
commit 9b477230e0
3 changed files with 167 additions and 19 deletions

View File

@@ -12,6 +12,7 @@
#include <assert.h>
#include <stdint.h>
#include <ctype.h>
#define BUF_INIT {{0}}
@@ -147,4 +148,10 @@ static inline uint32_t buf_hash(Buf *buf) {
return h;
}
static inline void buf_upcase(Buf *buf) {
for (int i = 0; i < buf_len(buf); i += 1) {
buf_ptr(buf)[i] = toupper(buf_ptr(buf)[i]);
}
}
#endif