Add typing to dbEvent.h opaque structs when -DUSE_TYPED_DBEVENT

This commit is contained in:
Michael Davidsaver
2023-08-25 09:45:14 +02:00
committed by Andrew Johnson
parent 3b50194837
commit 2e4113b63b
8 changed files with 22 additions and 3 deletions

View File

@ -14,6 +14,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>

View File

@ -13,6 +13,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <limits.h>
#include "epicsMutex.h"

View File

@ -12,6 +12,8 @@
* Author Jeff Hill
*/
#define USE_TYPED_DBEVENT
#include <stdlib.h>
#include "epicsMutex.h"

View File

@ -19,6 +19,8 @@
*/
#define EPICS_PRIVATE_API
#define USE_TYPED_DBEVENT
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>

View File

@ -32,6 +32,15 @@ struct dbChannel;
struct db_field_log;
struct evSubscrip;
#ifdef USE_TYPED_DBEVENT
struct dbEventContext; // use dbEventCtx
typedef struct evSubscrip* dbEventSubscription;
typedef struct dbEventContext* dbEventCtx;
#else
typedef void * dbEventSubscription;
typedef void * dbEventCtx;
#endif
DBCORE_API int db_event_list (
const char *name, unsigned level);
DBCORE_API int dbel (
@ -39,8 +48,6 @@ DBCORE_API int dbel (
DBCORE_API int db_post_events (
void *pRecord, void *pField, unsigned caEventMask );
typedef void * dbEventCtx;
typedef void EXTRALABORFUNC (void *extralabor_arg);
DBCORE_API dbEventCtx db_init_events (void);
DBCORE_API int db_start_events (
@ -63,7 +70,6 @@ DBCORE_API void db_init_event_freelists (void);
typedef void EVENTFUNC (void *user_arg, struct dbChannel *chan,
int eventsRemaining, struct db_field_log *pfl);
typedef void * dbEventSubscription;
DBCORE_API dbEventSubscription db_add_event (
dbEventCtx ctx, struct dbChannel *chan,
EVENTFUNC *user_sub, void *user_arg, unsigned select);

View File

@ -15,6 +15,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>

View File

@ -14,6 +14,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>

View File

@ -14,6 +14,7 @@
#include <string.h>
#define EPICS_PRIVATE_API
#define USE_TYPED_DBEVENT
#include "dbmf.h"
#include "epicsUnitTest.h"