diff options
author | CNLohr <charles@cnlohr.com> | 2018-03-10 18:09:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-10 18:09:00 -0500 |
commit | 78507e78bc7ff8aaffbe24642cf7b7a689b419c6 (patch) | |
tree | b73ec4341a111fd0fd007f24f7d94a3b9b5b6b4b /include | |
parent | c96eba564989b1f5956c2b6c0f38e72195a9fd58 (diff) | |
parent | f5022be0b94cbd5b5ead8dc6035551ae1d011db0 (diff) | |
download | libsurvive-78507e78bc7ff8aaffbe24642cf7b7a689b419c6.tar.gz libsurvive-78507e78bc7ff8aaffbe24642cf7b7a689b419c6.tar.bz2 |
Merge pull request #103 from jdavidberger/verify_FLT_at_startup
Added a check at init that makes sure the user agrees with what FLT is
Diffstat (limited to 'include')
-rw-r--r-- | include/libsurvive/survive.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/libsurvive/survive.h b/include/libsurvive/survive.h index 30f5817..d9b5f08 100644 --- a/include/libsurvive/survive.h +++ b/include/libsurvive/survive.h @@ -156,7 +156,15 @@ struct SurviveContext }; -SurviveContext * survive_init( int headless ); +SurviveContext * survive_init_internal( int headless ); + +// Baked in size of FLT to verify users of the library have the correct setting. +void survive_verify_FLT_size(uint32_t user_size); + +static inline SurviveContext * survive_init( int headless ) { + survive_verify_FLT_size(sizeof(FLT)); + return survive_init_internal( headless ); +} //For any of these, you may pass in 0 for the function pointer to use default behavior. //In general unless you are doing wacky things like recording or playing back data, you won't need to use this. |