C++ and a stored procudre

Lists: pgsql-hackers
From: Czuczy Gergely <phoemix(at)harmless(dot)hu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: C++ and a stored procudre
Date: 2003-09-02 14:42:13
Message-ID: Pine.LNX.4.44.0309021639040.17012-100000@localhost
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hello

once again :)
the code is this:
text *src;
void *tmp;
src = (text*)tmp;

and the error message:
error: parse error before `)' token
(at (text*_)_)

originally i've tried to use the macro PG_GETARG_TEXT_P(0), but when i've
got this message, i've asked the preprocessor for the preprocess code, to
get this makro resolved. after i've resolved the macro:
((text *)pg_detoast_datum((struct varlena *)((Pointer)(fcinfo->arg[0]))))
i've got this.
what's the problem with the (text*) casting?

Bye,

Gergely Czuczy
mailto: phoemix(at)harmless(dot)hu
PGP pubkey: http://phoemix.harmless.hu/phoemix.pgp
iRCNet: #demoscene ICQ: 8067175

The point is, that geeks are not necessarily the outcasts
society often believes they are. The fact is that society
isn't cool enough to be included in our activities.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/VKxHbBsEN0U7BV0RAqSsAJ997nmsbPeeC9O1MlJF44ZeUIGW0wCgzTTx
moUw1UBTFs+nIM+q7josTlU=
=35gD
-----END PGP SIGNATURE-----


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Czuczy Gergely <phoemix(at)harmless(dot)hu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: C++ and a stored procudre
Date: 2003-09-02 16:58:46
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

Czuczy Gergely <phoemix(at)harmless(dot)hu> writes:
> the code is this:
> text *src;
> void *tmp;
> src = (text*)tmp;

> and the error message:
> error: parse error before `)' token
> (at (text*_)_)

The only thing that comes to mind is you've got "text" defined as a
macro, or some other meaning besides the original typedef.

regards, tom lane