Re: Passing parameters to a C function

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Rodrigo Sakai <rodrigo(dot)sakai(at)poli(dot)usp(dot)br>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Passing parameters to a C function
Date: 2007-05-30 14:41:20
Message-ID: 20070530144120.GA18387@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 30, 2007 at 11:26:01AM -0300, Rodrigo Sakai wrote:
> I have a question about passing parameters to a C function. Imagine the
> example by PostgreSQL:
>
> PG_FUNCTION_INFO_V1(complex_add);

> But using version 1 calling convention it won't work! So, how can I pass the
> 'a' and 'b' variables in complex_add(?, ?)?

Use the DirectFunctionCalln functions in fmgr.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-05-30 15:00:39 Re: Passing parameters to a C function
Previous Message Rodrigo Sakai 2007-05-30 14:26:01 Passing parameters to a C function