From: Mark Wooding Date: Sun, 30 Aug 2015 09:58:38 +0000 (+0100) Subject: src/class-output.lisp: Make `__CONV_' macros more robust. X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/bb172d5341a0c453bdf46ac4ef5dd68c8077c724 src/class-output.lisp: Make `__CONV_' macros more robust. If the formal argument name is a simple identifier, then things come unstuck when there's a chain head with that same nickname. So make the argument name be something which isn't allowed as a class nickname. --- diff --git a/src/class-output.lisp b/src/class-output.lisp index eb5bc26..d914864 100644 --- a/src/class-output.lisp +++ b/src/class-output.lisp @@ -98,8 +98,8 @@ (format stream "/* Conversion macros. */~%") (dolist (super (cdr (sod-class-precedence-list class))) (let ((super-head (sod-class-chain-head super))) - (format stream "#define ~:@(~A__CONV_~A~)(p) ((~A *)~ - ~:[SOD_XCHAIN(~A, (p))~;(p)~])~%" + (format stream "#define ~:@(~A__CONV_~A~)(_obj) ((~A *)~ + ~:[SOD_XCHAIN(~A, (_obj))~;(_obj)~])~%" class (sod-class-nickname super) super (eq chain-head super-head) (sod-class-nickname super-head))))