diff --git a/src/makeBaseApp/top/exampleApp/src/dbSubExample.c b/src/makeBaseApp/top/exampleApp/src/dbSubExample.c index a57d8bf3b..ecd8c5455 100644 --- a/src/makeBaseApp/top/exampleApp/src/dbSubExample.c +++ b/src/makeBaseApp/top/exampleApp/src/dbSubExample.c @@ -1,5 +1,6 @@ #include +#include #include #include #define epicsExportSharedSymbols @@ -28,6 +29,6 @@ static registryFunctionRef mySubRef[] = { epicsShareFunc void epicsShareAPI mySub(void) { - registryFunctionRefAdd(mySubRef,registryFunctionRefNumber(mySubRef)); + registryFunctionRefAdd(mySubRef,NELEMENTS(mySubRef)); } diff --git a/src/registry/registryFunction.h b/src/registry/registryFunction.h index 98e07e8bf..32ce96259 100644 --- a/src/registry/registryFunction.h +++ b/src/registry/registryFunction.h @@ -19,11 +19,9 @@ extern "C" { typedef void (*REGISTRYFUNCTION)(void); typedef struct registryFunctionRef { - char *name; + const char *name; REGISTRYFUNCTION addr; }registryFunctionRef; -#define registryFunctionRefNumber(functionRefArray) \ - (sizeof((functionRefArray))/sizeof(registryFunctionRef)) /* c interface definitions */ epicsShareFunc int epicsShareAPI registryFunctionAdd(