diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index 372f32d7d..ef0b35d07 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -28,6 +28,50 @@ interpreter can be selectively disabled from echoing comments coming from a script by starting those lines with '#-' rather than just '#'.

+

Typed record support methods

+ +

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.

+

Changes made between 3.15.3 and 3.16.0.1