Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4514 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85194 invoked by uid 1010); 17 Sep 2003 15:17:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 85171 invoked from network); 17 Sep 2003 15:17:08 -0000 Received: from unknown (HELO vmmr7.verisignmail.com) (216.168.230.187) by pb1.pair.com with SMTP; 17 Sep 2003 15:17:08 -0000 Received: from ms6.verisignmail.com (ms6.verisignmail.com [216.168.230.179] (may be forged)) by vmmr7.verisignmail.com (Mirapoint Messaging Server MOS 3.2.2-GA) with ESMTP id PBB28316; Wed, 17 Sep 2003 11:16:19 -0400 (EDT) Received: from cipherquest.com (132-1.240.81.adsl.skynet.be [81.240.1.132]) by ms6.verisignmail.com (Mirapoint Messaging Server MOS 3.2.2-GA) with ESMTP id ASE78663; Wed, 17 Sep 2003 11:16:17 -0400 (EDT) Message-ID: <3F687ACD.3080006@cipherquest.com> Date: Wed, 17 Sep 2003 17:16:29 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Wez Furlong CC: internals@lists.php.net, jay@php.net References: <20030917141743.65402.qmail@pb1.pair.com> <20030917142722.84139.qmail@pb1.pair.com> <033101c37d2a$b6bbdf50$0702a8c0@TITAN> <3F687746.8010208@cipherquest.com> <034401c37d2d$26eccf80$0702a8c0@TITAN> In-Reply-To: <034401c37d2d$26eccf80$0702a8c0@TITAN> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: C++ extension question From: iore@cipherquest.com (Igal Ore) yes you right again , but as i suggested , adn thinking that problem is existin in this scenatrio cert.cpp (main file with all PHP required defitions and becoming a big source file; all php includes surrounded by extern "C" {}) php_TPKCS12.cpp have only functions related to PKCS#12 treating (encypted file storage for end user certificates, private keys and etc.) meaning in this file there implementation for php functions dealing with p12 And there i have a problem , at least i think. After brief verification i'm do not use in second file and Classes associated with problem that you mentioned. Wez Furlong wrote: >No, that only prevents the file being included twice in the same .cpp file. >The solution to this problem is to move the function bodies into their own >.cpp file: > >foo.h: >class Foo { >Foo(); >~Foo(); >}; > >fooclass.cpp: >Foo::Foo() { ... } >Foo::~Foo() { ... } > >--Wez. > > >----- Original Message ----- >From: "Igal Ore" >To: ; "Wez Furlong" >Cc: ; >Sent: Wednesday, September 17, 2003 4:01 PM >Subject: Re: [PHP-DEV] Re: C++ extension question > > > > >>you are right , and for those cases there a preprocessor protection >>#ifndef DO_NOT_MAKE_BOBO >>#define DO_NOT_MAKE_BOBO >> >>class Foo{ >>Foo(){...} >>~Foo(){...} >>}; >>#endif >> >> >>isn't it? >> >>Wez Furlong wrote: >> >> >>>This sounds like the "rookie" mistake of declaring your functions inline >>> >>> >in > > >>>the class definition in the header files, and then including those >>> >>> >headers > > >>>in multiple files. >>> >>>eg: foo.h: >>> >>>class Foo { >>> Foo() { ... } >>> ~Foo() { ... } >>>}; >>> >>>foo.cpp: >>>#include "foo.h" >>> >>>bar.cpp: >>>#include "foo.h" >>> >>>== linker problems. >>> >>>--Wez. >>> >>> > > > > >