1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

how to pass constrant strings with length at compile time

This commit is contained in:
psyc://psyced.org/~lynX 2011-04-23 17:16:05 +02:00
parent f6448c8fe7
commit 742323e414
2 changed files with 12 additions and 7 deletions

View file

@ -98,6 +98,9 @@ typedef struct
const char* ptr;
} PSYC_Array;
#define PSYC_C2ARRAY(string) { sizeof(string)-1, string }
#define PSYC_C2ARG(string) string, sizeof(string)-1
/* intermediate struct for a PSYC variable modification */
typedef struct {
char oper; // not call it 'operator' as C++ may not like that..?