mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
* Source/NSObjCRuntime.m:
o added NSAssert in GSGetInstanceVariable() and GSSetInstanceVariable() git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12478 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2d2d75860a
commit
bb6cd75591
1 changed files with 4 additions and 1 deletions
|
@ -128,7 +128,8 @@ GSGetInstanceVariable(id obj, NSString *iVarName, void *data)
|
|||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
//This very highly unprobable value can be used as a marker
|
||||
NSAssert(offset!=UINT_MAX,@"Bad Offset");
|
||||
memcpy(data, ((void*)obj) + offset, size);
|
||||
return YES;
|
||||
}
|
||||
|
@ -144,6 +145,8 @@ GSSetInstanceVariable(id obj, NSString *iVarName, const void *data)
|
|||
{
|
||||
return NO;
|
||||
}
|
||||
//This very highly unprobable value can be used as a marker
|
||||
NSAssert(offset!=UINT_MAX,@"Bad Offset");
|
||||
memcpy(((void*)obj) + offset, data, size);
|
||||
return YES;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue