[PyKDE] Architecture dependent bug in sip
    Pete Ware 
    ware at cis.ohio-state.edu
       
    Thu May 25 22:24:45 BST 2000
    
    
  
In sip/gencode.c(line 5954) is this code in 
        prcode(FILe *fp, char *fmt, ...)
        switch (ch)
        {
        case 'c':
                {
                        char c = va_arg(ap,char);
                        if (c == '\n')
                                ++currentLineNr;
that works on a little endian machine (x86) as the compiler actually
passes the parameter in the low order byte of an int which is the
first byte.  On a big endian machine (sparc) the compiler also passes
it in the low order byte of an int but that is the fourth byte and the
above code grabs the first byte.  The result was files generated by
sip at a bunch of NUL ('\0') characters.
Change it to
                        char c = va_arg(ap,int);
and everything works.
--pete
    
    
More information about the PyQt
mailing list