NSObject: Change return type of setVersion: from id to void

This commit is contained in:
hmelder 2023-11-11 20:12:21 +01:00 committed by Hugo Melder
parent ac38295f64
commit a66d25598e
2 changed files with 2 additions and 3 deletions

View file

@ -363,7 +363,7 @@ GS_EXPORT_CLASS GS_ROOT_CLASS
+ (BOOL) isSubclassOfClass: (Class)aClass;
+ (id) new;
+ (void) poseAsClass: (Class)aClassObject;
+ (id) setVersion: (NSInteger)aVersion;
+ (void) setVersion: (NSInteger)aVersion;
+ (NSInteger) version;
- (id) awakeAfterUsingCoder: (NSCoder*)aDecoder;

View file

@ -2220,14 +2220,13 @@ static id gs_weak_load(id obj)
/**
* Sets the version number of the receiving class. Should be nonnegative.
*/
+ (id) setVersion: (NSInteger)aVersion
+ (void) setVersion: (NSInteger)aVersion
{
if (aVersion < 0)
[NSException raise: NSInvalidArgumentException
format: @"%s +setVersion: may not set a negative version",
GSClassNameFromObject(self)];
class_setVersion(self, aVersion);
return self;
}
/**