OK, at this link http://publications.gbdirect.co.uk/c_book/chapter8/typedef.html
I've found the following example:
/*
* Using typedef, declare 'func' to have type
* 'function taking two int arguments, returning int'
*/
typedef int func(int, int);
/* ERROR */
func func_name{ /*....*/ }
/* Correct. Returns pointer to a type 'func' */
func *func_name(){ /*....*/ }
/*
* Correct if functions could return functions,
* but C can't.
*/
func func_name(){ /*....*/ }
I'm fine with that. So I´ll try tomorrow if Robert´s modifications can
handle this form. Thank's for the point, Greg!
On Sat, Oct 4, 2008 at 1:04 AM, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Lisandro Dalcin wrote:
>
>> Greg, I´m not a C lawyer, but as reference, the MPI standard uses
>> "typedef int (f)(args)" everywhere
>
> I just tried an experiment, and gcc seems to acccept
> either
>
> typedef int f(void);
>
> or
>
> typedef int (f)(void);
>
> --
> Greg
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev