php-developer-list | 2002112
Date: 11/30/02
- Next message: Sebastian Bergmann: "Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: Zend / zend.c zend.h zend_builtin_functions.c"
- Previous message: Sterling Hughes: "Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++"
- In reply to: Sterling Hughes: "Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 thinks they will not understand. So why making it more
complex
and harder to understand the whole stuff for all of us?
> > 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 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 Schumann wrote:
> > >
> > >
> > >>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 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.
> > >>
> > >> I'm reluctant to duplicate the contents of the .c file for
> > >> maintenance reason. Cannot you just put the C++ specific
> > >> code into a
> > >>
> > >> /* Remove this part, if this is not a C++ extension */
> > >> #ifdef __cplusplus
> > >>
> > >> #endif
> > >>
> > >> section?
> > >>
> > >> - Sascha
> > >
> > >
> > >
> >
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Sebastian Bergmann: "Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: Zend / zend.c zend.h zend_builtin_functions.c"
- Previous message: Sterling Hughes: "Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++"
- In reply to: Sterling Hughes: "Re: [PHP-DEV] [PATCH] Changes to ext_skel for C++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

