Re: Zeroing out instance variables
Re: Zeroing out instance variables
- Subject: Re: Zeroing out instance variables
- From: Ben Haller <email@hidden>
- Date: Sat, 17 Apr 2010 09:06:26 -0400
3. bzero(individual + individualIvarsOffset, individualIvarsSize);
This should cast "individual" to void* before doing the pointer
arithmetic, of course.
And of course by "void*" you meant "uint8_t*". Pointer arithmetic
is undefined on voids... it happens to be supported by gcc & clang
but it's just as easy to write correct code.
Ah, interesting. Learn a new thing every day. The compiler didn't
even warn.
Ben Haller
McGill University
_______________________________________________
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