[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2210092021390.21609@hadrien>
Date: Sun, 9 Oct 2022 20:21:49 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Kees Cook <keescook@...omium.org>
cc: cocci@...ia.fr, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] python: Add make_expr and include_match documentation
On Sun, 9 Oct 2022, Kees Cook wrote:
> Add the 'make_expr' and 'include_match' helpers in the Python
> documentation. Additionally cleans up a markdown-breaking line split.
>
> Signed-off-by: Kees Cook <keescook@...omium.org>
Applied, thanks!
julia
> ---
> python/python_documentation.md | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/python/python_documentation.md b/python/python_documentation.md
> index d0194d6c1391..1d933b9a3934 100644
> --- a/python/python_documentation.md
> +++ b/python/python_documentation.md
> @@ -11,13 +11,20 @@ file at the end of the execution of the Python script.
>
> Example: tests/exitp.cocci
>
> +## cocci.include_match(state)
> +
> +If a python rule is running, it has matched. If the match should be
> +removed from consideration, this can be called with `state` set to
> +`False`.
> +
> +Example: tests/incpos.cocci
> +
> ## cocci.has_env_binding(rule, name)
>
> Returns `true` if the meta-variable `name` is bound in the rule
> `rule`.
>
> -## cocci.add_pending_instance(files, virtual_rules, virtual_identifiers,
> - extend_virtual_ids)
> +## cocci.add_pending_instance(files, virtual_rules, virtual_identifiers, extend_virtual_ids)
>
> Internal function for the method iteration.register().
>
> @@ -28,9 +35,17 @@ Converts the string `id` to a C identifier.
>
> Example: tests/python_mdecl.cocci
>
> +## cocci.make_expr(expr)
> +
> +Converts the thing `expr` to a C expression.
> +(Equivalent to Coccilib.make_expr in OCaml.)
> +
> +Example: tests/python_mdecl.cocci
> +
> ## cocci.make_stmt(phrase)
>
> Parses the string `phrase` as a C statement and returns the statement.
> +(Equivalent to Coccilib.make_stmt in OCaml.)
>
> Example: tests/python_mdecl.cocci
>
> --
> 2.34.1
>
>
Powered by blists - more mailing lists