gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] Interfacing to C -- How do we map size_t to Modula-2?


From: Benjamin Kowarsch
Subject: Re: [Gm2] Interfacing to C -- How do we map size_t to Modula-2?
Date: Fri, 14 Jul 2017 02:35:12 +0900


On Jul 14, 2017, at 01:50, Benjamin Kowarsch <address@hidden> wrote:

Trouble is that I cannot possibly call confstr() from within a definition module in Modula-2.

GM2 will have to do the work. It needs to either provide a SIZET type in module SYSTEM that always matches size_t for the current target, or ...

I have been reading the XDS Modula-2 docs and ... surprise, surprise ...

XDS's SYSTEM module does in fact export a type size_t.

I think GM2 should follow that example.


IMPORT SYSTEM;

PROCEDURE strlen(s: ARRAY OF CHAR): SYSTEM.size_t;

This is the safest way to do it.


reply via email to

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