comp.lang.ada
 help / color / mirror / Atom feed
From: Antonio Vargas <antonio.vargas@clix.pt>
Subject: Function returning "Boolean" in a binding
Date: Sat, 23 Dec 2000 02:47:27 +0000
Date: 2000-12-23T02:47:27+00:00	[thread overview]
Message-ID: <977543301.615948@cachalote.ip.pt> (raw)


Hi 

(Sorry about the bad English :-)  )

I'm making a public binding to the SDL graphics library and
I'm studying other bindings in other to make things right.

In the process of testing  adabindx-0.7.1 under Gnat 3.13p

I've found this problem.

With Gnat I can't compile this code, accusing an internal bug:

   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) ?. 

Is it  just a gnat bug  or a bug and non-standard coding,  since
I can't find nothing related to that in the ARM  or Gnat docs?

Thanks in advance.

Antonio Vargas




             reply	other threads:[~2000-12-23  2:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-23  2:47 Antonio Vargas [this message]
2000-12-23 15:36 ` Function returning "Boolean" in a binding Ted Dennison
2000-12-23 16:29   ` Antonio Vargas
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