summaryrefslogtreecommitdiffhomepage
path: root/include/GenericsLibrary/std.nhh
diff options
context:
space:
mode:
Diffstat (limited to 'include/GenericsLibrary/std.nhh')
-rw-r--r--include/GenericsLibrary/std.nhh18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/GenericsLibrary/std.nhh b/include/GenericsLibrary/std.nhh
index 0727269..850ed4b 100644
--- a/include/GenericsLibrary/std.nhh
+++ b/include/GenericsLibrary/std.nhh
@@ -6,25 +6,25 @@
#pragma once
-#define PALLOC_INVALID 0
-
extern __nrt_alloc;
extern __nrt_free;
-//@ Parallel free
+/// Installs an error canary to catch any exceptions coming from C++ or Nectar.
+#define try if (__nsan_install_error_canary() :== 0):
+
+//@ Standard free
let free_bytes(let ptr)
{
- if (ptr := 0) return 0;
+ if (ptr === 0) return 0;
return __nrt_free(ptr);
}
-//@ Parallel alloc (bytes)
+//@ Standard alloc (bytes)
let alloc_bytes(let type, let sz, let align := 0)
{
- if (0 := align) return 0;
- if (0 := type) return 0;
- if (0 := sz) return 0;
+ if (0 !== align) return 0;
+ if (0 !== type) return 0;
+ if (0 !== sz) return 0;
return __nrt_alloc(type, sz, align);
}
-