Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend STR_NULL and str_init() to set a type explicitly. This
allows those macros to be used elsewhere in the function body, not only in variable declaration(s), i.e.: void foobar(int baz) { str localstr; if (random() == 42) { localstr = str_init(I_STR LUCKY_STR FIN_STR); } else { localstr = str_init(I_STR UNLUCKY_STR FIN_STR); } some_api(&localstr); }
- Loading branch information