cleanup a->w cross calls in advapi32/crypt.c

Jeroen Janssen japj at xs4all.nl
Mon Aug 2 15:58:43 CDT 2004


James Hawkins wrote:
> I'm wasn't exactly sure on this one so it would be great if you could
> help me on this one.  When using pointer arithmetic, do the operations
> such as --, ++... increment or decrement by the size of the pointer
> type?  

Yes, if you have a char (1byte) pointer and you ++, you'll get one byte 
further. If you have a short (2byte) you'll get two bytes further in 
memory. If you have a long (4byte) pointer, you'll get 4 bytes further 
in memory if you ++.

It is simular to dealing with arrays (looking at the memory layout)

If you have an array of structs and need to get to the next struct in 
the array then you will need to look sizeof(struct) further in memory to 
find the next item in the array.
---
Jeroen




More information about the wine-devel mailing list