diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-03-07 22:41:10 -0700 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-03-07 22:45:15 -0700 |
commit | 728f6f9e7f0a99aa584e7f35ade387e852b5fa83 (patch) | |
tree | cc9c89ec0501bcad3e480b5ef9444bde1b4bc7c8 /include/libsurvive/survive.h | |
parent | 1a686a660c750499d3e1c4b46e3c506748147a08 (diff) | |
download | libsurvive-728f6f9e7f0a99aa584e7f35ade387e852b5fa83.tar.gz libsurvive-728f6f9e7f0a99aa584e7f35ade387e852b5fa83.tar.bz2 |
Added a check at init that makes sure the user agrees with what FLT is
Diffstat (limited to 'include/libsurvive/survive.h')
-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. |