print pointer
- From: "John Cupitt" <jcupitt gmail com>
- To: Gtk-App-Devel-List <gtk-app-devel-list gnome org>
- Subject: print pointer
- Date: Mon, 8 May 2006 12:17:01 +0100
Hello list, I need to be able to print pointers portably. So on a
32-bit platform I need:
void *p;
printf( "pointer = 0x%x\n", (unsigned int) p );
and on x64 I need:
printf( "pointer = 0x%lx\n", (unsigned long int) p );
glib has G_GSIZE_FORMAT, which is almost what I need, except it's decimal.
Is there a way to do this that I'm missing? Or do I need some configurey?
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]