Skip to content

Commit 4eb00b2

Browse files
pjungkampsdroege
authored andcommitted
gio: Use manual env: &[OsString] parameter for SubprocessLauncher::set_environ
1 parent d1c6bd4 commit 4eb00b2

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

gio/Gir.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,9 @@ status = "generate"
14431443
[[object.function]]
14441444
name = "close"
14451445
cfg_condition = "unix"
1446+
[[object.function]]
1447+
name = "set_environ"
1448+
manual = true
14461449

14471450
[[object]]
14481451
name = "Gio.ThemedIcon"

gio/src/auto/subprocess_launcher.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,6 @@ impl SubprocessLauncher {
7979
}
8080
}
8181

82-
#[doc(alias = "g_subprocess_launcher_set_environ")]
83-
pub fn set_environ(&self, env: &[&std::path::Path]) {
84-
unsafe {
85-
ffi::g_subprocess_launcher_set_environ(self.to_glib_none().0, env.to_glib_none().0);
86-
}
87-
}
88-
8982
#[doc(alias = "g_subprocess_launcher_set_flags")]
9083
pub fn set_flags(&self, flags: SubprocessFlags) {
9184
unsafe {

gio/src/subprocess_launcher.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
#[cfg(any(unix, all(docsrs, unix)))]
44
use std::os::unix::io::IntoRawFd;
55

6-
#[cfg(unix)]
76
use glib::translate::*;
87

9-
#[cfg(unix)]
108
use crate::ffi;
11-
129
use crate::SubprocessLauncher;
1310

1411
#[cfg(all(docsrs, not(unix)))]
@@ -19,6 +16,13 @@ pub trait IntoRawFd: Sized {
1916
}
2017

2118
impl SubprocessLauncher {
19+
#[doc(alias = "g_subprocess_launcher_set_environ")]
20+
pub fn set_environ(&self, env: &[std::ffi::OsString]) {
21+
unsafe {
22+
ffi::g_subprocess_launcher_set_environ(self.to_glib_none().0, env.to_glib_none().0);
23+
}
24+
}
25+
2226
#[cfg(unix)]
2327
#[cfg_attr(docsrs, doc(cfg(unix)))]
2428
#[doc(alias = "g_subprocess_launcher_take_fd")]

0 commit comments

Comments
 (0)