diff options
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/hilbert/kernel/application.hpp | 10 | ||||
-rw-r--r-- | kernel/include/hilbert/kernel/utility.hpp | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/kernel/include/hilbert/kernel/application.hpp b/kernel/include/hilbert/kernel/application.hpp index e7c7d2e..9c2e851 100644 --- a/kernel/include/hilbert/kernel/application.hpp +++ b/kernel/include/hilbert/kernel/application.hpp @@ -104,6 +104,7 @@ namespace hilbert::kernel::application { utility::id_allocator<generic_stream_ptr> open_streams; utility::id_allocator<socket_listener *> running_socket_listeners; + public: struct string_pair { utility::string a; utility::string b; @@ -111,6 +112,9 @@ namespace hilbert::kernel::application { utility::list<string_pair> environment_variables; + private: + string_pair *find_environment_variable(const utility::string &name); + public: utility::string name; @@ -126,10 +130,12 @@ namespace hilbert::kernel::application { process(app_memory *memory, const utility::string &name); ~process(); - //arguments are utility::move'd - void add_environment_variable( + void set_environment_variable( utility::string &&name, utility::string &&value); + void set_environment_variable( + const utility::string &name, const utility::string &value); + //null if unset utility::string *get_environment_variable(const utility::string &name); diff --git a/kernel/include/hilbert/kernel/utility.hpp b/kernel/include/hilbert/kernel/utility.hpp index b0ced32..3fe14b0 100644 --- a/kernel/include/hilbert/kernel/utility.hpp +++ b/kernel/include/hilbert/kernel/utility.hpp @@ -212,7 +212,12 @@ namespace hilbert::kernel::utility { buffer[i] = other.buffer[i]; } - vector(vector &&other) = delete; + vector(vector &&other) + : buffer(other.buffer), + buffer_len(other.buffer_len), + count(other.count) { + other.buffer = 0; + } ~vector() { if (buffer) |