poke-devel
[Top][All Lists]
Advanced

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

Re: Re: GNU poke 3.90.0 on FreeBSD/sparc64


From: Mohammad-Reza Nabipoor
Subject: Re: Re: GNU poke 3.90.0 on FreeBSD/sparc64
Date: Thu, 25 Jan 2024 23:41:27 +0100

Hi Bruno and Jose.

On Thu, Jan 25, 2024 at 10:57:44AM +0100, Jose E. Marchesi wrote:
> 
> Hi Bruno, Mohammad.
> 
> > * libpoke/libpoke.h (pk_compiler): Don't define if already defined.
> > * poke/pk-term.h (pk_compiler): Likewise.
> > ---
> >  libpoke/libpoke.h | 3 +++
> >  poke/pk-term.h    | 3 +++
> >  2 files changed, 6 insertions(+)
> >
> > diff --git a/libpoke/libpoke.h b/libpoke/libpoke.h
> > index baee3b91..65d318d3 100644
> > --- a/libpoke/libpoke.h
> > +++ b/libpoke/libpoke.h
> > @@ -36,7 +36,10 @@
> >  #define LIBPOKE_NONNULL(...)
> >  #endif
> >  
> > +#ifndef PK_COMPILER_DEFINED
> >  typedef struct _pk_compiler *pk_compiler;
> > +# define PK_COMPILER_DEFINED 1
> > +#endif
> >  typedef struct _pk_ios *pk_ios;
> >  typedef uint64_t pk_val;
> >  
> > diff --git a/poke/pk-term.h b/poke/pk-term.h
> > index 57274d4f..227378d6 100644
> > --- a/poke/pk-term.h
> > +++ b/poke/pk-term.h
> > @@ -24,7 +24,10 @@
> >  #include <textstyle.h>
> >  
> >  /* From libpoke.h.  */
> > +#ifndef PK_COMPILER_DEFINED
> >  typedef struct _pk_compiler *pk_compiler;
> > +# define PK_COMPILER_DEFINED 1
> > +#endif
> >  
> >  /* Defined in poke.c.  */
> >  extern pk_compiler poke_compiler;
> 
> Isn't better to just include libpoke.h in pk-term.h?  Mohammad?
> 

I do agree with you Jose; because `poke' cli is a user of the API; it's not 
good to
introduce a macro to just serve a program.

Thank you Bruno for the proposed fix.  But I think it's more elegant to include
the `libpoke.h'.

My initial idea was to not include the whole header file for a single opaque
data type.  But apparently we have to do it.

I'll fix it.


Regards,
Mohammad-Reza



reply via email to

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