Browse code

- str formatting macro by Bogdan Pintea closes SER-127

Jan Janak authored on 22/11/2006 18:13:40
Showing 1 changed files
... ...
@@ -40,4 +40,7 @@ typedef struct _str str;
40 40
 #define STR_STATIC_INIT(v) {(v), sizeof(v) - 1}
41 41
 #define STR_NULL {NULL, 0}
42 42
 
43
+#define STR_FMT(_pstr_)	\
44
+  ((_pstr_) ? (_pstr_)->len : 0), ((_pstr_) ? (_pstr_)->s : "")
45
+
43 46
 #endif