sizeof a function
sizeof a function
- Subject: sizeof a function
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Tue, 9 Nov 2010 00:06:29 +0700
These lines:
typedef char *(*my_type)(const char *, int);
my_type some = index;
fprintf(stderr,"sizeof(index): %lu\n", sizeof(index));
fprintf(stderr,"sizeof(some): %lu\n", sizeof(some));
produce:
sizeof(index): 1
sizeof(some): 8
This is x86_64 so the pointer-size should be 8 bytes. But why is the size of index = 1?
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden