From d07b31dd5a01c3fbcd551e2bcd3262eb0f601762 Mon Sep 17 00:00:00 2001 From: Giles Atkinson <“gatk555@gmail.com”> Date: Thu, 7 May 2026 18:36:54 +0100 Subject: [PATCH] Add CPP macros to allow XSPICE macros to be used in local functions. --- src/include/ngspice/cm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/include/ngspice/cm.h b/src/include/ngspice/cm.h index 1f3854e3a..59a0b60bd 100644 --- a/src/include/ngspice/cm.h +++ b/src/include/ngspice/cm.h @@ -79,6 +79,14 @@ NON-STANDARD FEATURES #endif #endif +/* Define the type and standard name of the single argument to code-model + * functions as macros. These may be used to enable the use XSPICE macros + * in other functions of the code model. + */ + +#define XSPICE_ARG_TYPE Mif_Private_t * +#define XSPICE_ARG mif_private + /* * type safe variants of the functions for char arguments */