[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to translate this C struct to gm2 type?
From: |
Gaius Mulley |
Subject: |
Re: How to translate this C struct to gm2 type? |
Date: |
Tue, 24 Mar 2020 18:22:13 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hưng Hưng <address@hidden> writes:
> typedef int (*Iparamcb)(Ihandle* dialog, int param_index, void*
> user_data);
>
> I'm stucked. Please help.
Hi,
ah very interesting:
(* typedef int (*Iparamcb)(Ihandle* dialog, int param_index, void*
user_data); *)
FROM SYSTEM IMPORT ADDRESS ;
TYPE
Iparamcb = PROCEDURE (VAR dialog: Ihandle; param_index: INTEGER;
user_data: ADDRESS) ;
is one interpretation of the C data structure.
It does depend upon how you want to use the parameters. The above is a
match but so to is:
FROM SYSTEM IMPORT ADDRESS ;
TYPE
PtrToIhandle = POINTER TO Ihandle;
Iparamcb = PROCEDURE (dialog: PtrToIhandle; param_index: INTEGER;
user_data: ADDRESS) ;
regards,
Gaius