Skip to content

Instantly share code, notes, and snippets.

@leiless
Created November 30, 2018 03:36
Show Gist options
  • Save leiless/c961a75fc5eb4f00e9ef21c5d6729807 to your computer and use it in GitHub Desktop.
Save leiless/c961a75fc5eb4f00e9ef21c5d6729807 to your computer and use it in GitHub Desktop.
static strlen() macro for char[]
/*
* XXX: Should used only for `char[]'(NOT `char *')
*/
#define QSTRLEN(s) (sizeof(s) - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment