diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2002-07-11 15:37:18 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2002-07-11 15:37:18 +0000 |
commit | 67c2312c8db5544c67d80c483904731c7eb256a2 (patch) | |
tree | e8d5a7bf78ac78ee88292ca40b855c315aa711f2 | |
parent | 65e8f0b2b10dc7e5645532393181074c7806928f (diff) |
Dans callback_exn, rectifier extern_sp lorsque l'interprete termine sur une exception (PR#1228)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4991 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | byterun/callback.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/byterun/callback.c b/byterun/callback.c index e5f0d27af..2d25b4f7b 100644 --- a/byterun/callback.c +++ b/byterun/callback.c @@ -55,6 +55,7 @@ static void thread_callback(void) CAMLexport value callbackN_exn(value closure, int narg, value args[]) { int i; + value res; Assert(narg + 4 <= 256); Init_callback(); @@ -66,7 +67,9 @@ CAMLexport value callbackN_exn(value closure, int narg, value args[]) extern_sp[narg + 3] = closure; callback_code[1] = narg + 3; callback_code[3] = narg; - return interprete(callback_code, sizeof(callback_code)); + res = interprete(callback_code, sizeof(callback_code)); + if (Is_exception_result(res)) extern_sp += narg + 4; /* PR#1228 */ + return res; } CAMLexport value callback_exn(value closure, value arg1) |