diff options
author | Dr. Orion Lawlor <lawlor@alaska.edu> | 2017-04-17 21:38:46 -0800 |
---|---|---|
committer | Dr. Orion Lawlor <lawlor@alaska.edu> | 2017-04-17 21:38:46 -0800 |
commit | 06f580d722136051c55653f6767f185b396f3371 (patch) | |
tree | 693507ec399449049d33ad367002910b16db05d2 /include/libsurvive/survive_types.h | |
parent | 9b1309c6dd9b38502b04d6bedb64f57acc7341e8 (diff) | |
download | libsurvive-06f580d722136051c55653f6767f185b396f3371.tar.gz libsurvive-06f580d722136051c55653f6767f185b396f3371.tar.bz2 |
Support calling the library from C++, by adding extern "C" decorations, and including correct prototypes.
Diffstat (limited to 'include/libsurvive/survive_types.h')
-rw-r--r-- | include/libsurvive/survive_types.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libsurvive/survive_types.h b/include/libsurvive/survive_types.h index bfd0b1d..224719e 100644 --- a/include/libsurvive/survive_types.h +++ b/include/libsurvive/survive_types.h @@ -1,6 +1,11 @@ #ifndef _SURVIVE_TYPES_H #define _SURVIVE_TYPES_H +#ifdef __cplusplus +extern "C" { +#endif + + #ifndef FLT #ifdef USE_DOUBLE #define FLT double @@ -39,6 +44,9 @@ typedef int (*DeviceDriver)( SurviveContext * ctx ); typedef int (*DeviceDriverCb)( struct SurviveContext * ctx, void * driver ); typedef int (*DeviceDriverMagicCb)( struct SurviveContext * ctx, void * driver, int magic_code, void * data, int datalen ); +#ifdef __cplusplus +}; +#endif #endif |