Index: src/OFConstString.h ================================================================== --- src/OFConstString.h +++ src/OFConstString.h @@ -20,12 +20,19 @@ /** * A class for storing static strings using the @"" literal. */ @interface OFConstString: OFObject { - char *string; - size_t length; + char *string; +#ifdef __objc_INCLUDE_GNU + unsigned int length; +#else + int length; +#if __LP64__ + int _unused; +#endif +#endif } /** * \return The OFString as a C string */ Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -115,18 +115,19 @@ andSelector: _cmd]; method->method_imp = newimp; return oldimp; #else - IMP imp = class_getMethodImplementation(class, selector); - Method method = class_getInstanceMethod(self, selector); + Method m; + IMP imp; - if (imp == NULL || method == NULL) + if ((m = class_getInstanceMethod(self, selector)) == NULL || + (imp = method_getImplementation(m)) == NULL) @throw [OFInvalidArgumentException newWithClass: self andSelector: _cmd]; - return method_setImplementation(method, imp); + return method_setImplementation(m, imp); #endif } - init { @@ -238,11 +239,11 @@ } - (uint32_t)hash { /* Classes containing data should reimplement this! */ - return (uint32_t)self; + return (uint32_t)(intptr_t)self; } - addToMemoryPool: (void*)ptr { void **memchunks;