comp.lang.ada
 help / color / mirror / Atom feed
* Function returning "Boolean" in a binding
@ 2000-12-23  2:47 Antonio Vargas
  2000-12-23 15:36 ` Ted Dennison
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Vargas @ 2000-12-23  2:47 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-12-24 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2000-12-24 13:14     ` Marc A. Criley

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