|
From: Eyal L. <ey...@ey...> - 2003-03-18 22:31:49
|
> Jeremy Fitzhardinge wrote: > > On Tue, 2003-03-18 at 04:37, Eyal Lebedinsky wrote: > > > '%d' is good for 'int', what is the correct one for 'Int'? If I > > use '%ld' then I violated the type hiding. In C this is a problem > > and for this reason I prefer to use basic types wherever I can, and > > typedef only where actually necessary. > > > No. VG_(message) is a Valgrind-internal function, so it is defined in > terms of Int, Char, etc, including the interpretation of %d. %ld is > for Long, which is 64 bits. OK, this is good. However, I still am unclear on a few idioms in vg. e.g., when adding to vg_mylibs.c I see some functions are defines as Int my_connect (... while others use Int VG_(write_socket)(... Another confusing point: I see identical functions defined in different contexts, like VG_(do_syscall2) in general and my_do_syscall2 in vg_mylibsc.c. Is there a need for vg_mylibc.c to be independent? Attached in a patch that uses the abstracted types exclusively. -- Eyal Lebedinsky (ey...@ey...) <http://samba.org/eyal/> |