develooper Front page | perl.perl5.porters | Postings from February 2015

Re: [perl #123727] [PATCH] INTERN/EXTERN C++ cleanup

Thread Previous
Steve Hay
February 9, 2015 09:10
Re: [perl #123727] [PATCH] INTERN/EXTERN C++ cleanup
Message ID:
On 4 February 2015 at 07:18, bulk88 <> wrote:
> # New Ticket Created by  bulk88
> # Please include the string:  [perl #123727]
> # in the subject line of all future correspondence about this issue.
> # <URL: >
> This is a bug report for perl from,
> generated with the help of perlbug 1.40 running under perl 5.21.4.
> -----------------------------------------------------------------
> [Please describe your issue here]
> This patch never got any comments in its its original thread at
> , so I am filing it as a ticket. It is not intended to be committed as
> is (no commit body for example).

A couple of thoughts, without having tested it yet:

I don't think the comment "Win32 GCC errors out with
"..\perl.h:4614:35: error: expected unqualified-id before string
constant" if dllexport is first, then EXTERN_C" in INTERN.h is
necessary. That's normal, isn't it? The extern "C" always has to be
first, e.g. VC++ also errors with: "'__declspec(dllexport)' :
storage-class or type specifier(s) unexpected here; ignored. 'linkage
specification' requires use of keyword 'extern' and must precede all
other specifiers".

I've stared at the line

#  if (defined(WIN32) && defined(__MINGW32__)) || defined(__SYMBIAN32__)

in INTERN.h before and wondered why something different is done for
MinGW compared to VC++ on Windows. Why do we have all the dllexport
stuff for MinGW but not for VC++? Couldn't the line change either to
"#if defined(WIN32) || defined(__SYMBIAN32__)" or to "#ifdef

Otherwise it looks good to me, except for the "#ifdef DOINIT" part in
perl.h, which I didn't understand. I see that it's defining variables
after their declarations, but it's not obvious to me why this is
necessary now.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About