]> sigrok.org Git - sigrok-util.git/commit - source/drv-api.c
new-driver: keep driver_info local to the api.c source file
authorGerhard Sittig <redacted>
Sat, 17 Nov 2018 19:32:25 +0000 (20:32 +0100)
committerUwe Hermann <redacted>
Thu, 20 Dec 2018 15:55:09 +0000 (16:55 +0100)
commit8cb6848a1f106540003ba76a5704769cf3dd0897
tree0a75743b18f2b29cd359ea1b0534b4e8b7bfed93
parent40176503b91458db7e439dd9154d1c41d0216c9c
new-driver: keep driver_info local to the api.c source file

There is a circular reference between the driver info structure (which
lists callback routines) and a driver's routines (one of them may have
to reference the driver info). Add a forward declaration, and keep the
declaration and the implementation 'static' within the api.c source
file. Otherwise linker issues may arise should developers put the
declaration into protocol.h since it's marked as SR_PRIV in the template.
source/drv-api.c