porting C code

Peter Hansen peter at engcorp.com
Fri Jan 14 23:32:50 EST 2005


Lucas Raab wrote:
> Sorry, the third "byte" is what I meant. 

Fair enough.  Note, however, that as someone pointed out,
it's actually the *fourth* of something, and it would not
necessarily be a byte.  In fact, in your case, it's not:

> typedef   unsigned long int  word32 ;
> void mu(word32 *a)
> {
> int i ;
> word32 b[3] ;

This defines an array of *3* long (32-bit) integers.

> b[0] = b[1] = b[2] = 0 ;

Each of these is just indexing into that array, starting
as Python does with an index origin of zero.

> The "a[#]" and "b[#]" are the parts that are giving me trouble.

Between the clarifications you've got and Duncan's post,
you shouldn't have much more trouble now. :-)

-Peter



More information about the Python-list mailing list