mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-04 11:54:59 +00:00
Further versioning fix.
Reviewed by me.
This commit is contained in:
1 parent
ce0ddb2e1f
commit
f667c39ade
2 files changed
+19
-5
No files matched your search
@@ -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 (?)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user