5050# define RECSUPFUN_CAST
5151# endif
5252
53- # if EPICS_VERSION_INT < VERSION_INT(3,16,0,0)
54- # define USE_NEW_DB_FUNCS
53+ # if EPICS_VERSION_INT < VERSION_INT(3,16,0,1)
54+ # define dbLinkIsConstant (lnk ) ((lnk)->type == CONSTANT )
55+ # define dbLinkIsVolatile (lnk ) ((lnk)->type == CA_LINK )
5556# endif
5657
5758#else
@@ -650,13 +651,8 @@ long setLinks(luascriptRecord* record)
650651
651652 for (unsigned index = 0 ; index < NUM_ARGS + STR_ARGS + 1 ; index += 1 )
652653 {
653- if (field == &record->out ) { pvt->outlink_field_type = DBF_NOACCESS ; }
654-
655- #ifdef USE_NEW_DB_FUNCS
656- if (dbLinkIsConstant (field)) {
657- #else
658- if (field->type == CONSTANT ) {
659- #endif
654+ if (dbLinkIsConstant (field))
655+ {
660656 if (index < NUM_ARGS )
661657 {
662658 recGblInitConstantLink (field, DBF_DOUBLE , value);
@@ -665,7 +661,6 @@ long setLinks(luascriptRecord* record)
665661
666662 *valid = luascriptINAV_CON;
667663 }
668- #ifdef USE_NEW_DB_FUNCS
669664 else if (dbLinkIsVolatile (field))
670665 {
671666 if (dbIsLinkConnected (field))
@@ -681,22 +676,6 @@ long setLinks(luascriptRecord* record)
681676 {
682677 *valid = luascriptINAV_LOC;
683678 }
684- #else
685- else if (!dbNameToAddr (field->value .pv_link .pvname , paddress))
686- {
687- *valid = luascriptINAV_LOC;
688-
689- if (field == &record->out )
690- {
691- pvt->outlink_field_type = paddress->field_type ;
692- }
693- }
694- else
695- {
696- *valid = luascriptINAV_EXT_NC;
697- pvt->caLinkStat = CA_LINKS_NOT_OK ;
698- }
699- #endif
700679
701680 db_post_events (record, valid, DBE_VALUE );
702681
0 commit comments