Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-12-02 Thread J Smith
That's what I was thinking. The new patch updates skeleton.c a bit and fixes ext_skel to either add extern C stuff to skeleton.c or get rid of it. I think it would be simpler for extension first-timers to not worry about what __cplusplus means, or why extern C is there in the first place, etc.

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-12-02 Thread George Schlossnagle
J Smith wrote: That's what I was thinking. The new patch updates skeleton.c a bit and fixes ext_skel to either add extern C stuff to skeleton.c or get rid of it. I think it would be simpler for extension first-timers to not worry about what __cplusplus means, or why extern C is there in the

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-12-02 Thread J Smith
Or it could just not be there at all? What the big deal here? It's four extra lines in ext_skel to get rid of it. Besides, you can comment the hell out of it, write six pages of documentation surrounded in /* */ if you want, you know there will be people asking why there's C++ code in their

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-11-30 Thread Shane Caraveo
Is there any reason the ifdef __cplusplus doesn't work? There shouldn't be any need for extra processing or config options. J Smith wrote: How about adding something like this to skeleton.c: /* __begin_extern_c__ */ /* __end_extern_c__ */ And having the sed script in ext_skel replace them

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-11-30 Thread Sterling Hughes
Is there any reason the ifdef __cplusplus doesn't work? There shouldn't be any need for extra processing or config options. well, i think c++ code might confuse people just starting out writing a C extension... -Sterling J Smith wrote: How about adding something like this to skeleton.c:

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-11-30 Thread Marcus Börger
At 18:07 30.11.2002, Sterling Hughes wrote: Is there any reason the ifdef __cplusplus doesn't work? There shouldn't be any need for extra processing or config options. well, i think c++ code might confuse people just starting out writing a C extension... -Sterling But there are more

[PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-11-29 Thread J Smith
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

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-11-29 Thread Shane Caraveo
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

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-11-29 Thread Sascha Schumann
On Fri, 29 Nov 2002, 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

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-11-29 Thread J Smith
Is this a problem with VS.net or something? I've never done that with any of my C++ extensions and they've all worked fine on VC++ 6. If it is a problem, though, I'll make the changes. J Shane Caraveo wrote: J Smith wrote: Attached is a patch to ext_skel that adds an optional argument

Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++

2002-11-29 Thread J Smith
How about adding something like this to skeleton.c: /* __begin_extern_c__ */ /* __end_extern_c__ */ And having the sed script in ext_skel replace them with the proper extern C stuff? That way there's no need for skeleton.cpp and just a few changes need to be made in skeleton.c. J Sascha