I'm failing to come up with a clever way of replacing
dbGetPdbAddrFromLink, which was removed in base 3.15. It was defined
as a macro in dbAccessDefs.h as this:
#define dbGetPdbAddrFromLink(PLNK) \
( ( (PLNK)->type != DB_LINK ) \
? 0 \
: ( ( (struct dbAddr *)( (PLNK)->value.pv_link.pvt) ) ) )
I can redefine this macro in my source code as the above, but is there
a better way of replacing its functionality, perhaps with a different
macro or function call?
Here's an example of how we were using it:
...
DBADDR *cntAddr = dbGetPdbAddrFromLink(&psub->inpi);
short *cntP;
long cntNord, offset;
struct rset *prset;
if (!cntAddr) return -1;
dbScanLock(cntAddr->precord);
if ((cntAddr->field_type == DBF_SHORT) && ((prset = dbGetRset(cntAddr)))) {
cntP = (short *)cntAddr->pfield;
if (!cntP) cntNord = 0;
else (*prset->get_array_info)(cntAddr, &cntNord, &offset);
} else {
cntP = 0;
cntNord = 0;
}
dbScanUnlock(cntAddr->precord);
...
This is for some rather critical systems, so we're trying at all costs
to avoid surprise runtime errors.
Any suggestions are much appreciated.
Mike
Michael Dunning
SLAC National Accelerator Laboratory
Accelerator Research Division Test Facilities
2575 Sand Hill Road, MS 63
Menlo Park, CA 94025
+1 (650) 926-5200
- Replies:
- Re: Replacement for dbGetPdbAddrFromLink ? Stubbs, Scott A.
- Navigate by Date:
- Prev:
Re: Webopi issue with Text Update widget rule Kasemir, Kay
- Next:
Compile Warning:"Device using undefined record type 'stringin', place-holder created Ricardo Herrero
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Webopi issue with Text Update widget rule Kasemir, Kay
- Next:
Re: Replacement for dbGetPdbAddrFromLink ? Stubbs, Scott A.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|