From 226f382c4ff9415b30c4331fc40396272ddd6bae Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Tue, 17 Mar 2015 19:41:36 +0100 Subject: [PATCH] Switch the predefined macros to variadic, to allow commas. --- main.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 7393fe1..8e59c36 100755 --- a/main.py +++ b/main.py @@ -284,10 +284,15 @@ def main(): preproc_cmdline = [ 'cpp', '-undef', '-x', 'c', '-std=c99', '-nostdinc', '-trigraphs', '-dN', '-fno-extended-identifiers', - '-Dinteger(x)=((integer)(x))', '-Dfloat(x)=((float)(x))', - '-Dstring(x)=((string)(x))', '-Dkey(x)=((key)(x))', - '-Drotation(x)=((rotation)(x))', '-Dquaternion(x)=((quaternion)(x))', - '-Dvector(x)=((vector)(x))', '-Dlist(x)=((list)(x))'] + '-Dinteger(...)=((integer)(__VA_ARGS__))', + '-Dfloat(...)=((float)(__VA_ARGS__))', + '-Dstring(...)=((string)(__VA_ARGS__))', + '-Dkey(...)=((key)(__VA_ARGS__))', + '-Drotation(...)=((rotation)(__VA_ARGS__))', + '-Dquaternion(...)=((quaternion)(__VA_ARGS__))', + '-Dvector(...)=((vector)(__VA_ARGS__))', + '-Dlist(...)=((list)(__VA_ARGS__))' + ] preproc = False script_header = False