Re: [PATCH] Changes to ext_skel for C++

From: Date: Fri, 29 Nov 2002 20:04:27 +0000
Subject: Re: [PATCH] Changes to ext_skel for C++
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-91938@lists.php.net to get a copy of this message
J Smith wrote:
Attached is a patch to ext_skel that adds an optional argument (--cpp) that will create a PHP extension in C++ rather than C. Also attached is skeleton.cpp, which basically mirrors ext/skeleton/skeleton.c with a few modifications for using C++. I could've just made some changes to skeleton.c and done some sed work in the ext_skel script, but I think it's clearer to have them separated into two files. The ext_skel patch is based on the current HEAD. Comments? J
skeleton.h also needs to be dealt with. If you do not, visual studio will export symbols as c++ symbols and the extension will not work. Simple solution is to have #ifdef __cplusplus extern "C" { #endif at the top of skeleton.h, and close it at the bottom. Shane

« previous php.dev (#91938) next »