Parcourir la source

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

Maxim Sobolev il y a 20 ans
Parent
commit
57bce7b681
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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