summaryrefslogtreecommitdiffstats
path: root/drivers/unix/os_unix.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-16 14:26:14 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-16 16:39:44 +0100
commit818a9e99a4bdbc6e3b12636ceff36759a778e848 (patch)
treedae35a70787bd6795f9738d54b8fe5008ff2ecac /drivers/unix/os_unix.h
parent04a39ecd846f40ac1049b699291f28b2f08e2185 (diff)
downloadredot-engine-818a9e99a4bdbc6e3b12636ceff36759a778e848.tar.gz
OS: Add `unset_environment`, better validate input
Instead of returning an undocumented boolean error code, we do the validation checks that should ensure a successful result. Based on: - https://linux.die.net/man/3/setenv - https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
Diffstat (limited to 'drivers/unix/os_unix.h')
-rw-r--r--drivers/unix/os_unix.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 416311307c..03429622ae 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -81,7 +81,9 @@ public:
virtual bool has_environment(const String &p_var) const override;
virtual String get_environment(const String &p_var) const override;
- virtual bool set_environment(const String &p_var, const String &p_value) const override;
+ virtual void set_environment(const String &p_var, const String &p_value) const override;
+ virtual void unset_environment(const String &p_var) const override;
+
virtual String get_locale() const override;
virtual void initialize_debugging() override;