From bb172d5341a0c453bdf46ac4ef5dd68c8077c724 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 30 Aug 2015 10:58:38 +0100 Subject: [PATCH] src/class-output.lisp: Make `__CONV_' macros more robust. Organization: Straylight/Edgeware From: Mark Wooding 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. --- src/class-output.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@ (defmethod hook-output progn ((class sod-class) (reason (eql :h)) sequencer) (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)))) -- [mdw]