From 0b410c1b03b1dfa6686b81e42a4759f31cb3473c Mon Sep 17 00:00:00 2001
From: Ralph Lange
Existing code (e.g. external record supports) might not compile cleanly -against the new rset definition without changes. Instead of adapting their -code as described further below, users can instead get the old untyped -definitions back by placing
+against the new rset definition without changes. -- --#define UNTYPED_RSET -
before including headers from base.
- -The following assumes that UNTYPED_RSET has not been defined.
- -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.
+The first parameter of init_record and process has been +changed to struct dbCommon *. Record types that use +void* here should be changed to use struct dbCommon*, and +cast the argument to their own xxxRecord *.
When compiled against this release, compiler warnings about incompatible types for the method pointers should be taken seriously. When compiled @@ -82,9 +62,9 @@ of base you need something like:
#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 +
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.