> -Original Message-
> From: Joe Wilson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 24, 2007 5:04 PM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] Fix for sqlite3.h in version 3.3.10
>
> --- James Dennett <[EMAIL PROTECTED]>
--- James Dennett <[EMAIL PROTECTED]> wrote:
> Joe Wilson wrote:
> > The proposed expression ((sqlite3_destructor_type)-1) is equivalent to
> > ((void(*)(void *))-1). They are interchangable.
>
> Not in C++. The difference being linkage; with the typedef declared in
> an extern "C" block, the
> -Original Message-
> From: Joe Wilson [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 22, 2007 5:20 PM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] Fix for sqlite3.h in version 3.3.10
>
> --- James Dennett <[EMAIL PROTECTED]> wrote:
> > > -
--- James Dennett <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Joe Wilson [mailto:[EMAIL PROTECTED]
> > Subject: Re: [sqlite] Fix for sqlite3.h in version 3.3.10
> [snip]
>
> > > I don't know if this is the right place to post sug
> >> Having SQLITE_TRANSIENT point to a real function is perhaps a
> >> good idea. The problem is such a change would break backwards
> >> compatibility of the API. Somebody who compiled against an
> >> older SQLite and who drops in a newer DLL with this change will
> >> find that their code no
> Having SQLITE_TRANSIENT point to a real function is perhaps a
> good idea. The problem is such a change would break backwards
> compatibility of the API. Somebody who compiled against an
> older SQLite and who drops in a newer DLL with this change will
> find that their code no longer works.
> On a related but separate note, is there any standard that guarantees
> that casting -1 to a function pointer type is reasonably portable?
This idiom is used widely enough to overload an argument so that it can
contain either a valid pointer, or convey a non-pointer state.
Take
"James Dennett" <[EMAIL PROTECTED]> wrote:
>
> On a related but separate note, is there any standard that guarantees
> that casting -1 to a function pointer type is reasonably portable? My
> experience is that it doesn't cause problems, but certainly it's not
> portable C or C++ from the
8 matches
Mail list logo