summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/NeKit
diff options
context:
space:
mode:
Diffstat (limited to 'dev/kernel/NeKit')
-rw-r--r--dev/kernel/NeKit/CxxAbi.h8
-rw-r--r--dev/kernel/NeKit/ErrorOr.h2
-rw-r--r--dev/kernel/NeKit/Ref.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/dev/kernel/NeKit/CxxAbi.h b/dev/kernel/NeKit/CxxAbi.h
index 164a257d..4b7bf002 100644
--- a/dev/kernel/NeKit/CxxAbi.h
+++ b/dev/kernel/NeKit/CxxAbi.h
@@ -7,7 +7,7 @@
#include <NeKit/Defines.h>
-#ifndef __TOOLCHAINKIT__
+#ifndef __NECTI__
#define kAtExitMacDestructors (128)
@@ -17,10 +17,10 @@ struct atexit_func_entry_t {
void* dso_handle;
};
-typedef unsigned uarch_t;
+typedef Kernel::UInt32 uarch_t;
namespace cxxabiv1 {
-typedef void* __guard;
+typedef Kernel::SizeT* __guard;
}
-#endif // __GNUC__
+#endif // !__NECTI__
diff --git a/dev/kernel/NeKit/ErrorOr.h b/dev/kernel/NeKit/ErrorOr.h
index b653e0ee..e8b3b6fc 100644
--- a/dev/kernel/NeKit/ErrorOr.h
+++ b/dev/kernel/NeKit/ErrorOr.h
@@ -38,6 +38,8 @@ class ErrorOr final {
return *this;
}
+ const T& Value() { return mRef.TryLeak(); }
+
Ref<T>& Leak() { return mRef; }
Int32 Error() { return mId; }
diff --git a/dev/kernel/NeKit/Ref.h b/dev/kernel/NeKit/Ref.h
index 46e94f88..a791ee1a 100644
--- a/dev/kernel/NeKit/Ref.h
+++ b/dev/kernel/NeKit/Ref.h
@@ -36,7 +36,7 @@ class Ref final {
T& Leak() noexcept { return fClass; }
- T& TryLeak() const noexcept { return fClass; }
+ T& TryLeak() noexcept { return fClass; }
T operator*() { return fClass; }