• R/O
  • SSH

quipu: Commit

quipu mercurial repository


Commit MetaInfo

Revisão79ae5adf5ed7b1d685f4289f4d9676ca46fc0483 (tree)
Hora2020-03-25 12:26:46
AutorAgustina Arzille <avarzille@rise...>
CommiterAgustina Arzille

Mensagem de Log

Implement the 'last-err' interface

Mudança Sumário

Diff

diff -r 947590230fba -r 79ae5adf5ed7 builtins.cpp
--- a/builtins.cpp Sun Mar 22 23:16:47 2020 +0000
+++ b/builtins.cpp Wed Mar 25 03:26:46 2020 +0000
@@ -1833,6 +1833,11 @@
18331833 }
18341834 }
18351835
1836+static DEFBUILTIN (last_err_fct)
1837+{
1838+ qp_return (interp->last_err.value);
1839+}
1840+
18361841 // Names for the builtins.
18371842 static const char BUILTIN_NAMES[] =
18381843 "%mkexc\0"
@@ -1891,6 +1896,7 @@
18911896 "isa\0"
18921897 "specform-p\0"
18931898 "last\0"
1899+ "last-err\0"
18941900 "%meth-ctl\0"
18951901 ;
18961902
@@ -1969,6 +1975,7 @@
19691975 { isa_fct, 2, -1 },
19701976 { specform_p, 1, 1 },
19711977 { last_fct, 1, 1 },
1978+ { last_err_fct, 0, 0 },
19721979 { p_meth_ctl, 1, -1 },
19731980 };
19741981
diff -r 947590230fba -r 79ae5adf5ed7 interp.h
--- a/interp.h Sun Mar 22 23:16:47 2020 +0000
+++ b/interp.h Wed Mar 25 03:26:46 2020 +0000
@@ -153,6 +153,7 @@
153153 {
154154 this->throw_frame = 0;
155155 this->exc_raised = false;
156+ this->last_err.value = NIL;
156157 }
157158
158159 void growstk (uint32_t __off);
Show on old repository browser