comp.lang.ada
 help / color / mirror / Atom feed
From: Antonio Vargas <antonio.vargas@clix.pt>
Subject: Re: Function returning "Boolean" in a binding
Date: Sat, 23 Dec 2000 16:29:44 +0000
Date: 2000-12-23T16:29:44+00:00	[thread overview]
Message-ID: <977592638.247411@cachalote.ip.pt> (raw)
In-Reply-To: 922gp1$8nm$1@nnrp1.deja.com



  
   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/
> 




  reply	other threads:[~2000-12-23 16:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-23  2:47 Function returning "Boolean" in a binding Antonio Vargas
2000-12-23 15:36 ` Ted Dennison
2000-12-23 16:29   ` Antonio Vargas [this message]
2000-12-24 13:14     ` Marc A. Criley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox