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:
parent
f6448c8fe7
commit
742323e414
2 changed files with 12 additions and 7 deletions
|
@ -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..?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue