develooper Front page | perl.vmsperl | Postings from May 2012

Re: C++, XS, and dNOOP, or Doing Nothing is Hard Work

Thread Previous | Thread Next
From:
Tony Cook
Date:
May 7, 2012 13:11
Subject:
Re: C++, XS, and dNOOP, or Doing Nothing is Hard Work
Message ID:
20120505021334.GA19399@mars.tony.develop-help.com
On Fri, May 04, 2012 at 11:57:42AM -0500, Craig A. Berry wrote:
> I've been taking a swing at compiling Perl with the HP C++ compiler for OpenVMS.[1]  There are a number of wrinkles to iron out, one of which boils down to:
> 
> $ type try.c
> #define dNOOP extern int Perl___notused(void)
> #define XSPROTO(name) void name(void)
> #define XS(name) extern "C" XSPROTO(name)

C++ has allowed mixed statements and declarations since its creation,
how about:

 #ifdef __cplusplus
 #define dNOOP
 #else
 #define dNOOP extern int Perl___notused(void)
 #endif

Tony

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About