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

problems with unsigned_long in foreign functions?




  I took at graphics context proxy and asked it for its plane mask.

Self 10> foo: myview manager gcb
shell
Self 11> foo plane_mask
Error: plane_mask failed: overflowError: result, integer.
Receiver is: <a child of traits xlib xGCValues> <57>.
## Stack trace for process <58>
##___Rcvr___Selector/Block__________File:line______Method-holder/location______
#4   <57>   error:                  errorHa...:102 errorHandling               
#5   <59>   [^error: 'plane_mask... xlib.w...:2652 [] in plane_mask            
#6   <60>   [^failBlock value: e]   xlib.w...:2666 [] in plane_maskIfFail:     
#7   <12>   ifTrue:False:           boolean:47     false                       
#8   <12>   ifFalse:True:           boolean:21     traits boolean              
#9   <61>   [('badTypeError'   i... xlib.w...:2664 [] in plane_maskIfFail:     
#10  <61>   value:With:             defaultB...:96 evaluating                  
#11  <62>   [_Call: arg1 IfFail:... foreign:190    [] in value:IfFail:         
#12  <63>   [('deadProxyError' i... foreign:70     [] in withRetryDo:IfFail:   
#13  <63>   value:With:             defaultB...:96 evaluating                  
#14  <62>   [_Call: arg1 IfFail:... foreign:190    [] in value:IfFail:         
#15  <64>   withRetryDo:IfFail:     foreign:69     traits abstractProxy        
#16  <64>   value:IfFail:           foreign:190    traits fctProxy calling     
#17  <57>   plane_maskIfFail:       xlib.w...:2662 traits xlib xGCValues raw   
#18  <57>   plane_mask              xlib.w...:2652 traits xlib xGCValues raw   
#19  <65>   plane_mask              xlib:667       traits xlib graphicsContext 
#20  <0>    doIt                    <the prompt>:1 shell                       
Self 12> foo
<xlib-graphicsContext(live)>
Self 13> 

  At first I thought that maybe the type was being declared as signed integer,
thus the overflow, but this makes no sense. It is defined as unsigned long,
and the primitiveMaker (the one distributed with the X stuff. CVS seems
to have botched its revision tag...) generated a macro that has that.
  Could the macro be wrong? I have yet to delve very deep into the macros
that are used. Two or three levels of nesting, and I give up :-)

  Thanks.