feat: load package version during build

This removes the duplication of the version string between the `Cargo.toml` and `constants.rs`
This commit is contained in:
dignifiedquire
2019-08-14 09:48:06 +02:00
committed by holger krekel
parent 7d51c6e4f4
commit 99aabef7f3
4 changed files with 16 additions and 8 deletions

View File

@@ -440,7 +440,7 @@ pub unsafe fn dc_get_info(context: &Context) -> *mut libc::c_char {
public_key_count={}\n\
fingerprint={}\n\
level=awesome\n",
as_str(DC_VERSION_STR as *const u8 as *const _),
&*DC_VERSION_STR,
rusqlite::version(),
sqlite3_threadsafe(),
// arch
@@ -481,7 +481,7 @@ pub unsafe fn dc_get_info(context: &Context) -> *mut libc::c_char {
}
pub unsafe fn dc_get_version_str() -> *mut libc::c_char {
dc_strdup(DC_VERSION_STR as *const u8 as *const libc::c_char)
(&*DC_VERSION_STR).strdup()
}
pub fn dc_get_fresh_msgs(context: &Context) -> *mut dc_array_t {