#312 SWIG_GetArgs broken on 64 bit

closed-out-of-date
general (37)
5
2012-04-28
2012-04-19
Anonymous
No

Swig 1.3.17u-20100630-1553 generates code which is in error on 64-bit systems. Diff file attached, explanation below.

The generated function SWIG_GetArgs(...) uses a varargs interface and accesses elements as a void * (That part is fine.) But wrap functions which call this function sometimes emits code like the following:
SWIG_GetArgs(interp, objc, objv,"oso:Tclstart self computerName dd ",0,&arg2,0)

The zero's are interpreted as int32's. The patch amends the emitted code to read:
SWIG_GetArgs(interp, objc, objv,"oso:Tclstart self computerName dd ",(void*)0,&arg2,(void*)0)
which safe on both 64 and 32 bit architectures.

Discussion


  • Anonymous
    2012-04-19

    64 bit patch for tcl8.cxx

     
    Attachments
  • William Fulton
    William Fulton
    2012-04-28

    Out of date, this was actually fixed some time ago.

     
  • William Fulton
    William Fulton
    2012-04-28

    • assigned_to: nobody --> wsfulton
    • status: open --> closed-out-of-date