diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-27 01:34:03 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-27 01:34:03 +0100 |
| commit | 81c082643568ef4507c92c6f8c4d7f2778274aa6 (patch) | |
| tree | 42f0d34b2535540074eb0766cbb71be93ed648f6 /include/GenericsLibrary | |
| parent | fe99a16c6d125186a08ce8a45b74684df24692f5 (diff) | |
[FEAT] Fix GenericsLibrary implementation for Nectar.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/GenericsLibrary')
| -rw-r--r-- | include/GenericsLibrary/algorithm.nhh | 6 | ||||
| -rw-r--r-- | include/GenericsLibrary/io.nhh | 2 | ||||
| -rw-r--r-- | include/GenericsLibrary/iterator.nhh | 4 | ||||
| -rw-r--r-- | include/GenericsLibrary/pstd.nhh | 8 | ||||
| -rw-r--r-- | include/GenericsLibrary/std.nhh | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/include/GenericsLibrary/algorithm.nhh b/include/GenericsLibrary/algorithm.nhh index 1dd1e0c..e339ba1 100644 --- a/include/GenericsLibrary/algorithm.nhh +++ b/include/GenericsLibrary/algorithm.nhh @@ -11,7 +11,7 @@ let for_each(let it, let action) { - for (let i := it.begin(); i != it.end(); i += 1) + for (let i := it.begin(); i !== it.end(); i += 1) { action(i); } @@ -21,7 +21,7 @@ let for_each(let it, let action) let find(let it, let predicate) { - for (let i := it.begin(); i != it.end(); i += 1) + for (let i := it.begin(); i !== it.end(); i += 1) { if (predicate(i)) { @@ -34,7 +34,7 @@ let find(let it, let predicate) let remove(let it, let pred) { - for (let i = it.begin(); i != it.end(); ++i) + for (let i = it.begin(); i !== it.end(); ++i) { if (pred(i)) { diff --git a/include/GenericsLibrary/io.nhh b/include/GenericsLibrary/io.nhh index bf2f351..b946db2 100644 --- a/include/GenericsLibrary/io.nhh +++ b/include/GenericsLibrary/io.nhh @@ -11,7 +11,7 @@ import core_print_format_ln; const writefn(let fmt, let args) { - if (fmt := 0) + if (fmt === 0) return; core_print_format_ln(fmt, {args}); diff --git a/include/GenericsLibrary/iterator.nhh b/include/GenericsLibrary/iterator.nhh index ecc82ed..f2d46e0 100644 --- a/include/GenericsLibrary/iterator.nhh +++ b/include/GenericsLibrary/iterator.nhh @@ -26,7 +26,7 @@ impl iterator : trait iterator_traits { let begin(let self) { - must_pass(self._begin != self._end); + must_pass(self._begin !== self._end); let begin := self._begin; return begin; @@ -34,7 +34,7 @@ impl iterator : trait iterator_traits let end(let self) { - must_pass(_begin != _end); + must_pass(_begin !== _end); let end := self._end; return end; diff --git a/include/GenericsLibrary/pstd.nhh b/include/GenericsLibrary/pstd.nhh index b8ac7ce..68154bd 100644 --- a/include/GenericsLibrary/pstd.nhh +++ b/include/GenericsLibrary/pstd.nhh @@ -17,16 +17,16 @@ extern __nrt_pthread_kill; //@ Parallel free let pfree_bytes(let ptr) { - if (ptr := 0) return 0; + if (ptr === 0) return 0; return __nrt_pfree(ptr); } //@ Parallel alloc (bytes) let palloc_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_palloc(type, sz, align); } diff --git a/include/GenericsLibrary/std.nhh b/include/GenericsLibrary/std.nhh index d23779c..850ed4b 100644 --- a/include/GenericsLibrary/std.nhh +++ b/include/GenericsLibrary/std.nhh @@ -15,16 +15,16 @@ extern __nrt_free; //@ Standard free let free_bytes(let ptr) { - if (ptr := 0) return 0; + if (ptr === 0) return 0; return __nrt_free(ptr); } //@ 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); } |
