gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the equivalent of const char* in gm2?


From: Gaius Mulley
Subject: Re: What is the equivalent of const char* in gm2?
Date: Tue, 24 Mar 2020 18:07:57 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hưng Hưng <address@hidden> writes:

> I'm creating a binding for gm2 by translating C header by I got
> stucked at this. Please help. Free Pascal has this syntax: const str:
> pchar; which pchar is c style null terminated string. I didn't found
> anything similar in gm2.

Hi,

you can create a DEFINITION MODULE FOR "C" module which provides gm2
with access to a C library.  Constant strings can contain escaped \
characters they are also null terminated.  For non constant strings it
might be worth having a look at:

http://git.savannah.gnu.org/cgit/gm2.git/tree/gcc-versionno/gcc/m2/gm2-libs/DynamicStrings.def
http://git.savannah.gnu.org/cgit/gm2.git/tree/gcc-versionno/gcc/m2/gm2-libs/FormatStrings.def

for other data types:

http://www.nongnu.org/gm2/elementary_data_types.html#section22
http://www.nongnu.org/gm2/interface_to_c.html#section41

hope this helps,

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]