info-sather
[Top][All Lists]
Advanced

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

Re: Interfacing with C - macros and stuff


From: Keith Hopper
Subject: Re: Interfacing with C - macros and stuff
Date: Tue, 11 Jan 2011 10:22:32 +1300
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6

Greetings,

Marek Janukowicz wrote:
Hello

Specification p. 15.2. reads: "Constants of external C types are interpreted
as C constants or macros.".

Am I misreading it or does it mean I should be able to do smth like:

external C class C_SMTH is
   const AI_PASSIVE : C_INT;
end;

This merely indicates that there already is a constant defined externally in some xxx.h or xxx.c of that name. All it does is define a Sather name so that the Sather compiler can put in the relevant linking information for gcc - with 'external class' name mangling, rather than ordinary Sather class name mangling.

        Keith



reply via email to

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