|
From: | Basile Starynkevitch |
Subject: | Re: [PATCH] Add debug stream parameter to init_jit() |
Date: | Sat, 14 Oct 2023 09:04:45 +0200 |
User-agent: | Mozilla Thunderbird |
Hi Paul. Please sendo the v2 and I will apply the patch during the weekend.
Em qua, 11 de out de 2023 12:57, Paul Cercueil <paul@crapouillou.net> escreveu:
Ooops, I missed to update the source files in check/.
I'll send a V2.
-Paul
Le mercredi 11 octobre 2023 à 17:47 +0200, Paul Cercueil a écrit :
> Allow specifying where Lightning's messages and disassembly will be
> printed, instead of inconditionally using the error output.
> diff --git a/include/lightning.h.in b/include/lightning.h.in
> index 6d51235..25f685b 100644
> --- a/include/lightning.h.in
> +++ b/include/lightning.h.in
> @@ -23,6 +23,7 @@
> #include <unistd.h>
> #include <stdlib.h>
> @MAYBE_INCLUDE_STDINT_H@
> +#include <stdio.h>
> #include <string.h>
> #include <pthread.h>
>
> @@ -1220,7 +1221,7 @@ typedef void
> (*jit_free_func_ptr) (void*);
> /*
> * Prototypes
> */
> -extern void init_jit(const char*);
> +extern void init_jit(const char*,FILE*);
> extern void finish_jit(void);
>
This patch is interesting and provides an interesting feature. However, it is changing the public API of GNU lightning in an incompatible way.
For projects (like the RefPerSys open source inference engine on https://github.com/RefPerSys/RefPerSys/ ....) which are using GNU lightning it would be very convenient to have a preprocessor convention (inspired by libgccjit on https://gcc.gnu.org/onlinedocs/jit/ ...) which enables users of GNU lightning to test it.
What about adding in include/lightning.h.in some preprocessor symbols like
#define LIB_LIGHTNING_API 1
and increment that number every time the external API of GNU lightning is changing?
This would make using GNU lightning easier.
Thanks
-- Basile Starynkevitch <basile@starynkevitch.net> (only mine opinions / les opinions sont miennes uniquement) 92340 Bourg-la-Reine, France web page: starynkevitch.net/Basile/
[Prev in Thread] | Current Thread | [Next in Thread] |