[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] libpoke/pkl-rt.pk: Fix condition arg of `_pkl_assert`
From: |
Mohammad-Reza Nabipoor |
Subject: |
[PATCH] libpoke/pkl-rt.pk: Fix condition arg of `_pkl_assert` |
Date: |
Fri, 18 Dec 2020 14:09:33 +0330 |
2020-12-18 Mohammad-Reza Nabipoor <m.nabipoor@yahoo.com>
* libpoke/pkl-rt.pk (_pkl_assert): Change `uint<64>` to `int<32>`
for condition argument. Booleans are expected to `int<32>` in Poke.
---
ChangeLog | 5 +++++
libpoke/pkl-rt.pk | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 8878ea88..d487c941 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-18 Mohammad-Reza Nabipoor <m.nabipoor@yahoo.com>
+
+ * libpoke/pkl-rt.pk (_pkl_assert): Change `uint<64>` to `int<32>`
+ for condition. Booleans are expected to `int<32>` in Poke.
+
2020-12-18 Mohammad-Reza Nabipoor <m.nabipoor@yahoo.com>
* poke/poke.c (parse_args_2): Go to `exit_failure` when
diff --git a/libpoke/pkl-rt.pk b/libpoke/pkl-rt.pk
index 046376fc..b24eddd9 100644
--- a/libpoke/pkl-rt.pk
+++ b/libpoke/pkl-rt.pk
@@ -163,7 +163,7 @@ fun _pkl_exception_handler = (Exception exception) int<32>:
of the assert statement formatted like "<FILENAME>:<LINE>:<COLUMN>".
*/
-fun _pkl_assert = (uint<64> cond, string msg, string lineinfo) void:
+fun _pkl_assert = (int<32> cond, string msg, string lineinfo) void:
{
if (cond)
return;
--
2.29.2
- [PATCH] libpoke/pkl-rt.pk: Fix condition arg of `_pkl_assert`,
Mohammad-Reza Nabipoor <=