poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Added PK_MI_REQ_PRINTV request for MI.


From: Jose E. Marchesi
Subject: Re: Added PK_MI_REQ_PRINTV request for MI.
Date: Tue, 03 Aug 2021 22:39:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Kostas.

> diff --git a/poke/pk-mi.c b/poke/pk-mi.c
> index 64670f5c..c97cc68a 100644
> --- a/poke/pk-mi.c
> +++ b/poke/pk-mi.c
> @@ -288,6 +288,29 @@ pk_mi_dispatch_msg (pk_mi_msg msg)
>              pk_mi_exit_p = 1;
>              break;
>            }
> +        case PK_MI_REQ_PRINTV:
> +          {
> +            int ok;
> +            pk_mi_msg resp;
> +            pk_val arg, val;
> +
> +            arg = pk_mi_get_arg (msg, "value");
> +
> +            ok = pk_defvar (poke_compiler, "__pkl_mi_value", arg);
> +            assert (ok == PK_OK);
> +
> +            ok = pk_compile_expression (poke_compiler,
> +                                        "format (\"%v\", mi_value)", NULL,

Isn't that supposed to be __pkl_mi_value?
How are you testing this btw?

> +                                        &val);
> +            assert (ok == PK_OK);
> +
> +            resp = pk_mi_make_resp (PK_MI_RESP_PRINTV, pk_mi_msg_number 
> (msg),
> +                                    1 /* success_p */, NULL /* errmsg */);
> +            pk_mi_set_arg (resp, "string", val);
> +            pk_mi_send (resp);
> +            pk_mi_msg_free (resp);
> +            break;
> +          }
>          default:
>            assert (0);
>          }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]