Sfoglia il codice sorgente

[str.h] Adding global variable of a empty str

Vinicius Teshima 1 anno fa
parent
commit
c36b70456b
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      src/str.h

+ 2 - 0
src/str.h

@@ -11,6 +11,8 @@ struct str {
 	size_t size;
 };
 
+const struct str STR_EMPTY = {"", 0};
+
 struct str_tokenizer {
 	struct str str;
 	size_t cur;