소스 검색

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

Vinicius Teshima 1 년 전
부모
커밋
c36b70456b
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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;