Removed chunk_from_buf() in favor of a simpler chunk_from_chars() macro

This commit is contained in:
Martin Willi
2009-09-11 15:39:35 +02:00
parent 3a7bd9bd49
commit 3b878dae7e
29 changed files with 207 additions and 389 deletions
+2 -2
View File
@@ -169,9 +169,9 @@ static inline void chunk_clear(chunk_t *chunk)
}
/**
* Initialize a chunk to point to buffer inspectable by sizeof()
* Initialize a chunk using a char array
*/
#define chunk_from_buf(str) { str, sizeof(str) }
#define chunk_from_chars(...) ((chunk_t){(char[]){__VA_ARGS__}, sizeof((char[]){__VA_ARGS__})})
/**
* Initialize a chunk to point to a thing