Further versioning fix.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2010-12-10 09:04:13 -08:00
1 parent ce0ddb2e1f
commit f667c39ade
2 files changed
+19 -5

No files matched your search

+3 -5
View File
@@ -454,11 +454,9 @@ var _classVersion = 0;
Sets the class version number.
@param the new version number for the class
*/
+ (id)setVersion:(int)aVersion
+ (void)setVersion:(int)aVersion
{
_classVersion = aVersion;
return self;
class_setVersion(self, aVersion);
}
/*!
@@ -466,7 +464,7 @@ var _classVersion = 0;
*/
+ (int)version
{
return _classVersion;
return class_getVersion(self);
}
// Scripting (?)
+16
View File
@@ -54,6 +54,8 @@ GLOBAL(objj_class) = function(displayName)
{
this.isa = NULL;
this.version = 0;
this.super_class = NULL;
this.sub_classes = [];
@@ -270,6 +272,20 @@ GLOBAL(class_copyMethodList) = function(/*Class*/ aClass)
DISPLAY_NAME(class_copyMethodList);
GLOBAL(class_getVersion) = function(/*Class*/ aClass)
{
return aClass.version;
}
DISPLAY_NAME(class_getVersion);
GLOBAL(class_setVersion) = function(/*Class*/ aClass, /*Integer*/ aVersion)
{
aClass.version = parseInt(aVersion, 10);
}
DISPLAY_NAME(class_setVersion);
GLOBAL(class_replaceMethod) = function(/*Class*/ aClass, /*SEL*/ aSelector, /*IMP*/ aMethodImplementation)
{
if (!aClass || !aSelector)