Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
remove some functions from windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 5, 2016
1 parent 8652f8f commit 6b68937
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ pub fn get_environ() -> Vec<String> {
}
}

#[cfg(unix)]
pub fn getenv(variable_name: &str) -> Option<String> {
unsafe {
from_glib_none(ffi::g_getenv(variable_name.to_glib_none().0))
}
}

#[cfg(unix)]
pub fn setenv(variable_name: &str, value: &str, overwrite: bool) -> bool {
unsafe {
from_glib(ffi::g_setenv(variable_name.to_glib_none().0,
Expand All @@ -64,6 +66,7 @@ pub fn setenv(variable_name: &str, value: &str, overwrite: bool) -> bool {
}
}

#[cfg(unix)]
pub fn unsetenv(variable_name: &str) {
unsafe {
ffi::g_unsetenv(variable_name.to_glib_none().0)
Expand Down Expand Up @@ -154,6 +157,7 @@ pub fn get_tmp_dir() -> Option<String> {
}
}

#[cfg(unix)]
pub fn get_current_dir() -> Option<String> {
unsafe {
from_glib_none(ffi::g_get_current_dir())
Expand Down

0 comments on commit 6b68937

Please sign in to comment.