[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] How do I declare a character pointer returned from a "C" funct
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] How do I declare a character pointer returned from a "C" function? |
Date: |
Tue, 31 Aug 2010 10:06:14 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
john o goyo <address@hidden> writes:
> Gaius:
>
> I am investigating the failure of TermFile and need to use a "C"
> funciton.
>
> In particular, I am calling a function that returns a character
> pointer. How do I declare this in the definition module for gm2?
>
> john
Hi John,
I'd use:
DEFINITION MODULE FOR "C" foo ;
TYPE
PtrToChar = POINTER TO CHAR ;
PROCEDURE bar () : PtrToChar ;
END foo.
<foo.c>
=======
char *bar (void)
{
return "hello world";
}
regards,
Gaius