Index: src/OFExceptions.m ================================================================== --- src/OFExceptions.m +++ src/OFExceptions.m @@ -135,11 +135,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Could not allocate %zu bytes in class %s!", req_size, - [class name]]; + [class className]]; return string; } - (size_t)requestedSize @@ -179,11 +179,11 @@ string = [[OFString alloc] initWithFormat: @"Memory at %p was not allocated as part of object of class %s, " @"thus the memory allocation was not changed! It is also possible " @"that there was an attempt to free the same memory twice.", - pointer, [class name]]; + pointer, [class className]]; return string; } - (void*)pointer @@ -221,11 +221,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The method %s of class %s is not or not fully implemented!", - SEL_NAME(selector), [class name]]; + SEL_NAME(selector), [class className]]; return string; } @end @@ -234,11 +234,11 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"Value out of range in class %s!", [class name]]; + @"Value out of range in class %s!", [class className]]; return string; } @end @@ -271,11 +271,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The argument for method %s of class %s is invalid!", - SEL_NAME(selector), [class name]]; + SEL_NAME(selector), [class className]]; return string; } @end @@ -284,11 +284,11 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"The encoding is invalid for class %s!", [class name]]; + @"The encoding is invalid for class %s!", [class className]]; return string; } @end @@ -297,11 +297,11 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"The format is invalid for class %s!", [class name]]; + @"The format is invalid for class %s!", [class className]]; return string; } @end @@ -311,11 +311,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The parser in class %s encountered malformed or invalid XML!", - [class name]]; + [class className]]; return string; } @end @@ -324,11 +324,11 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"Initialization failed for class %s!", [class name]]; + @"Initialization failed for class %s!", [class className]]; return string; } @end @@ -374,11 +374,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Failed to open file %s with mode %s in class %s! " ERRFMT, - [path cString], [mode cString], [self name], ERRPARAM]; + [path cString], [mode cString], [self className], ERRPARAM]; return string; } - (int)errNo @@ -483,15 +483,15 @@ return string;; if (has_items) string = [[OFString alloc] initWithFormat: @"Failed to read %zu items of size %zu in class %s! " - ERRFMT, req_items, req_size, [class name], ERRPARAM]; + ERRFMT, req_items, req_size, [class className], ERRPARAM]; else string = [[OFString alloc] initWithFormat: @"Failed to read %zu bytes in class %s! " ERRFMT, req_size, - [class name], ERRPARAM]; + [class className], ERRPARAM]; return string; } @end @@ -502,15 +502,15 @@ return string; if (has_items) string = [[OFString alloc] initWithFormat: @"Failed to write %zu items of size %zu in class %s! " - ERRFMT, req_items, req_size, [class name], ERRPARAM]; + ERRFMT, req_items, req_size, [class className], ERRPARAM]; else string = [[OFString alloc] initWithFormat: @"Failed to write %zu bytes in class %s! " ERRFMT, req_size, - [class name], ERRPARAM]; + [class className], ERRPARAM]; return string; } @end @@ -519,11 +519,11 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"Setting an option in class %s failed!", [class name]]; + @"Setting an option in class %s failed!", [class className]]; return string; } @end @@ -532,11 +532,12 @@ { if (string != nil) return string; string = [[OFString alloc] initWithFormat: - @"The socket of type %s is not connected or bound!", [class name]]; + @"The socket of type %s is not connected or bound!", + [class className]]; return string; } @end @@ -546,11 +547,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The socket of type %s is already connected or bound and thus " - @"can't be connected or bound again!", [class name]]; + @"can't be connected or bound again!", [class className]]; return string; } @end @@ -600,11 +601,11 @@ @"The service %s on %s could not be translated to an address in " @"class %s. This means that either the node was not found, there " @"is no such service on the node, there was a problem with the " @"name server, there was a problem with your network connection " @"or you specified an invalid node or service. " ERRFMT, - [service cString], [node cString], [class name], AT_ERRPARAM]; + [service cString], [node cString], [class className], AT_ERRPARAM]; return string; } - (int)errNo @@ -666,11 +667,11 @@ return string; string = [[OFString alloc] initWithFormat: @"A connection to service %s on node %s could not be established " @"in class %s! " ERRFMT, [node cString], [service cString], - [class name], ERRPARAM]; + [class className], ERRPARAM]; return string; } - (int)errNo @@ -736,11 +737,11 @@ return string; string = [[OFString alloc] initWithFormat: @"Binding service %s on node %s using family %d failed in class " @"%s! " ERRFMT, [service cString], [node cString], family, - [class name], ERRPARAM]; + [class className], ERRPARAM]; return string; } - (int)errNo @@ -794,11 +795,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Failed to listen in socket of type %s with a back log of %d! " - ERRFMT, [class name], backlog, ERRPARAM]; + ERRFMT, [class className], backlog, ERRPARAM]; return string; } - (int)errNo @@ -827,11 +828,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Failed to accept connection in socket of type %s! " ERRFMT, - [class name], ERRPARAM]; + [class className], ERRPARAM]; return string; } - (int)errNo @@ -846,11 +847,11 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"Joining a thread of class %s failed! Most likely, another thread " - @"already waits for the thread to join.", [class name]]; + @"already waits for the thread to join.", [class className]]; return string; } @end @@ -860,10 +861,10 @@ if (string != nil) return string; string = [[OFString alloc] initWithFormat: @"The requested action cannot be performed because the thread of " - @"class %s was canceled!", [class name]]; + @"class %s was canceled!", [class className]]; return string; } @end Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -49,11 +49,11 @@ + (Class)class; /** * \return The name of the class as a C string */ -+ (const char*)name; ++ (const char*)className; /** * \param selector The selector which should be checked for respondance * * \return A boolean whether instances of the class respond to the specified @@ -113,11 +113,11 @@ - (Class)class; /** * \return The name of the instance's class as a C string */ -- (const char*)name; +- (const char*)className; /** * \param class The class whose kind is checked * * \return A boolean whether the object is of the specified kind Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -86,11 +86,11 @@ + (Class)class { return self; } -+ (const char*)name ++ (const char*)className { #ifdef __objc_INCLUDE_GNU return class_get_class_name(self); #else return class_getName(self); @@ -198,11 +198,11 @@ - (Class)class { return isa; } -- (const char*)name +- (const char*)className { #ifdef __objc_INCLUDE_GNU return object_get_class_name(self); #else return class_getName(isa); Index: tests/OFAutoreleasePool/OFAutoreleasePool.m ================================================================== --- tests/OFAutoreleasePool/OFAutoreleasePool.m +++ tests/OFAutoreleasePool/OFAutoreleasePool.m @@ -41,11 +41,11 @@ id ret; inits++; ret = init(self, _cmd); - printf("New %s with retain cnt " ZD "\n", [self name], + printf("New %s with retain cnt " ZD "\n", [self className], [ret retainCount]); return ret; } @@ -54,20 +54,21 @@ id ret; retains++; ret = retain(self, _cmd); - printf("Retaining %s to " ZD "\n", [self name], [ret retainCount]); + printf("Retaining %s to " ZD "\n", [self className], [ret retainCount]); return ret; } - (void)release { releases++; - printf("Releasing %s to " ZD "\n", [self name], [self retainCount] - 1); + printf("Releasing %s to " ZD "\n", [self className], + [self retainCount] - 1); release(self, _cmd); } @end int