diff options
author | Yves Orton <demerphq@gmail.com> | 2022-09-05 12:05:16 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-09-08 07:55:45 +0200 |
commit | 077b44c7321d21b70dfdc26bc03d96b62d785cb8 (patch) | |
tree | 916b440d04c84facfbdb9dcdef2e19083dd849a7 /os2 | |
parent | 60d3cb45f882277cacea7440c4fdc3f3dc093403 (diff) | |
download | perl-077b44c7321d21b70dfdc26bc03d96b62d785cb8.tar.gz |
porting/diag.t - improved parsing a bit
The "multiline" logic of diag.t was getting confused by define
statements that would define a symbol to call an error function but not
end in ";", this would then slurp potentially many lines errorenously,
potentially absorbing more than one message. The multi-line logic also
would undef $listed_as and lose the diag_listed_as data in some
circumstances.
Fixing those issues revealed some interesting cases. To fix one of them
I defined a new noop macro in perl.h to help: PERL_DIAG_WARN_SYNTAX(),
which helps the diag.t parser identify messages without needing to be
actually part of a specific message line. These macros are noops, they
just return their argument, but they help hint to diag.t what is going
on. Maybe in the future this can be reworked to be more generic, there
are other similar cases that are not covered.
Interestingly fixing this bug meant that at least one message that used
to be erroneously picked up was no longer identified or tested. This was
replaced with a PERL_DIAG_DIE_SYNTAX() wrapper.
Diffstat (limited to 'os2')
-rw-r--r-- | os2/os2ish.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/os2/os2ish.h b/os2/os2ish.h index 0f80a4ddca..83528feee8 100644 --- a/os2/os2ish.h +++ b/os2/os2ish.h @@ -192,7 +192,7 @@ extern int rc; # define pthread_setspecific(k,v) (*(k)=(v),0) # define pthread_key_create(keyp,flag) \ ( DosAllocThreadLocalMemory(1,(unsigned long**)keyp) \ - ? Perl_croak_nocontext("LocalMemory"),1 \ + ? Perl_croak_nocontext("Out of memory!"), 1 \ : 0 \ ) #endif /* USE_SLOW_THREAD_SPECIFIC */ @@ -1239,4 +1239,3 @@ typedef struct { PQTOPLEVEL get_sysinfo(ULONG pid, ULONG flags); #endif /* _OS2_H */ - |