浏览代码

Backport STR_STATIC_INIT and STR_NULL macros from trunk, to simplify
backporting changes in modules.

Maxim Sobolev 20 年之前
父节点
当前提交
57bce7b681
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      str.h

+ 2 - 0
str.h

@@ -37,5 +37,7 @@ struct _str{
 
 typedef struct _str str;
 
+#define STR_STATIC_INIT(v) {(v), sizeof(v) - 1}
+#define STR_NULL {NULL, 0}
 
 #endif