bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] awk_ext_id_t inconsistency


From: Arnold Robbins
Subject: Re: [bug-gawk] awk_ext_id_t inconsistency
Date: Thu, 11 Jan 2018 21:55:46 +0200
User-agent: Heirloom mailx 12.5 6/20/10

Hi Andy & Panos,

I have fixed this and will push it out to the repo. Much thanks
for the report and discussion.

Arnold

> Date: Sun, 7 Jan 2018 10:18:29 -0500
> From: "Andrew J. Schorr" <address@hidden>
> To: Panos Papadopoulos <address@hidden>
> Subject: Re: [bug-gawk] awk_ext_id_t inconsistency
> Cc: address@hidden
>
> Hi Panos,
>
> On Sun, Jan 07, 2018 at 01:10:34PM +0200, Panos Papadopoulos wrote:
> > ext_id is a pointer to awk_ext_id_t or just of type awk_ext_id_t?
> > Please have a look in these two screenshots from the user guide:
> > 
> > [image: ???????????????????????? ???????????? 2]
> > 
> > 
> > [image: ???????????????????????? ???????????? 1]
>
> As you point out, there's an inconsistency. The boilerplate code
> in the manual says:
>
>      static awk_ext_id_t ext_id;
>
> whereas the chdir/stat example says:
>
>      static awk_ext_id_t *ext_id;
>
> Looking in gawkapi.h, we see:
>
> typedef void *awk_ext_id_t;     /* opaque type for extension id */
>
> So I think that "static awk_ext_id_t ext_id" is correct,
> and "static awk_ext_id_t *ext_id" is incorrect. Thanks for catching
> this. In reality, I don't think we actually use this anywhere, so that's
> why this has slipped under the radar. This seems to be incorrect in every
> extension actually shipped with gawk:
>
> bash-4.2$ grep ext_id_t extension/*.c
> extension/filefuncs.c:static awk_ext_id_t *ext_id;
> extension/fnmatch.c:static awk_ext_id_t *ext_id;
> extension/fork.c:static awk_ext_id_t *ext_id;
> extension/inplace.c:static awk_ext_id_t *ext_id;
> extension/intdiv.c:static awk_ext_id_t *ext_id;
> extension/ordchr.c:static awk_ext_id_t *ext_id;
> extension/readdir.c:static awk_ext_id_t *ext_id;
> extension/readdir_test.c:static awk_ext_id_t *ext_id;
> extension/readfile.c:static awk_ext_id_t *ext_id;
> extension/revoutput.c:static awk_ext_id_t *ext_id;
> extension/revtwoway.c:static awk_ext_id_t *ext_id;
> extension/rwarray.c:static awk_ext_id_t *ext_id;
> extension/rwarray0.c:static awk_ext_id_t *ext_id;
> extension/testext.c:static awk_ext_id_t *ext_id;
> extension/time.c:static awk_ext_id_t *ext_id;
>
> Regards,
> Andy
>
>



reply via email to

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