Created
January 19, 2012 20:25
-
-
Save konstantinbe/1642358 to your computer and use it in GitHub Desktop.
Serious C99 macro magic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CRString(string) (ID){.pointer = (CRPointer)(CRStringStructure[1]){{.behavior = (CRBehaviorStructure*)&CRStringClass, .retainCount = CRNaturalMax, .capacity = sizeof(string) / sizeof(CRChar), .length = sizeof(string) / sizeof(CRChar), .characters = string}}, .payload.natural = 0} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment