From f71fe62bc3a18d73b55bbe2b8ad79f879e2c4d2b Mon Sep 17 00:00:00 2001
From: Ben Franksen
The table of record support functions (rset methods for short) no longer +has entries of type RECSUPFUN (which says: any number and type of +arguments). The RECSUPFUN typedef has been removed and casts to +RECSUPFUN can no longer be used when initializing struct +rset. Record supports can define the macro REC_TYPE to the +name of their record type (including the Record suffix) before +including any headers from base, like this:
+ ++ ++#define REC_TYPE xxxRecord +
This will plug in xxxRecord for the first parameter of +init_record and process. Record types that use +void* here should be changed to use xxxRecord*. If +REC_TYPE is not defined, it will default to dbCommon, +which is suitable for code in base that calls rset methods but not for +record support, unless the methods cast the argument themselves.
+ +When compiled against this release, compiler warnings about incompatible +types for the method pointers should be taken seriously. When compiled +against older versions of base, such warnings are unavoidable.
+ +Record types written in C++ need to take more drastic measures because of +the stricter type checking in C++. To remain compatible with older versions +of base you need something like:
+ ++ ++#include "epicsVersion.h" +#define VERSION_INT_3_16 VERSION_INT(3,16,0,2) +#if EPICS_VERSION_INT < VERSION_INT_3_16 +#define RECSUPFUN_CAST (RECSUPFUN) +#else +#define RECSUPFUN_CAST +#endif +
in addition to the definition of REC_TYPE, and then replace +(RECSUPFUN) with RECSUPFUN_CAST when initializing the +rset. Further changes might be needed, e.g. to adapt const-ness of +method parameters.
+