From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,adb9c1625b28a830 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-23 09:30:42 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!news-ge.switch.ch!nntp01.fccn.pt!newshub.ip.pt!newsserver.ip.pt.POSTED!not-for-mail From: Antonio Vargas Subject: Re: Function returning "Boolean" in a binding Newsgroups: comp.lang.ada Reply-To: antonio.vargas@clix.pt References: <977543301.615948@cachalote.ip.pt> <922gp1$8nm$1@nnrp1.deja.com> User-Agent: KNode/0.4beta3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Organization: (none given) Message-ID: <977592638.247411@cachalote.ip.pt> Cache-Post-Path: cachalote.ip.pt!unknown@195-23-222-221.nr.ip.pt X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Date: Sat, 23 Dec 2000 16:29:44 +0000 NNTP-Posting-Host: 195.23.135.21 X-Trace: newsserver.ip.pt 977592638 195.23.135.21 (Sat, 23 Dec 2000 17:30:38 WET) NNTP-Posting-Date: Sat, 23 Dec 2000 17:30:38 WET Xref: supernews.google.com comp.lang.ada:3382 Date: 2000-12-23T16:29:44+00:00 List-Id: I thought that conversion from Boolean to C.int was conventioned (I read that somewhere ). But anyway since it is something dubious, the compiler should complain about undefined conversion Instead of the message "Internal bug". And then I'm surprised that they used such a thing in the binding in question. Antonio Vargas Ted Dennison wrote: > In article <977543301.615948@cachalote.ip.pt>, > antonio.vargas@clix.pt wrote: > > type Xt_Work_Proc is access function (Client_Data : in Xt_Pointer) >> return Boolean; >> pragma Convention (C, Xt_Work_Proc); >> >> But if I change the return type form "Boolean" to "Interfaces.C.Int" >> it compiles. Shouldn't the compiler make an automatic conversion >> from Boolean(Ada side) to C.int (C side) ?. > > Why? How does the compiler know that's what you want Boolean to map to? > You could want to use it for a C "char" for all it knows. > > > -- > T.E.D. > > http://www.telepath.com/~dennison/Ted/TED.html > > > Sent via Deja.com > http://www.deja.com/ >