diff --git a/SQLClient.h b/SQLClient.h index 2c78f02..6db0228 100644 --- a/SQLClient.h +++ b/SQLClient.h @@ -2256,7 +2256,8 @@ SQLCLIENT_PRIVATE /** Creates and returns a copy of aString as a literal, * whether or not aString is already a literal string. */ -extern SQLLiteral * SQLClientCopyLiteral(NSString *aString); +extern SQLLiteral * SQLClientCopyLiteral(NSString *aString) + NS_RETURNS_RETAINED; /** Function to test an object to see if it is considered to be a literal * string by SQLClient. Use this rather than trying to chewck the class @@ -2277,7 +2278,8 @@ extern SQLLiteral * SQLClientMakeLiteral(NSString *aString); * from a UTF8 or ASCII C string whose length (not including any nul * terminator) is the specified count. */ -extern SQLLiteral * SQLClientNewLiteral(const char *bytes, unsigned count); +extern SQLLiteral * SQLClientNewLiteral(const char *bytes, unsigned count) + NS_RETURNS_RETAINED; /** Creates and returns an autoreleased proxy to aString, recording the * fact that the programmer considers the string to be a valid literal diff --git a/SQLClient.m b/SQLClient.m index 3bb1ece..6994ff0 100644 --- a/SQLClient.m +++ b/SQLClient.m @@ -5398,15 +5398,6 @@ nextUTF8(const uint8_t *p, unsigned l, unsigned *o, unichar *n) return [super dataUsingEncoding: encoding allowLossyConversion: flag]; } -- (void) dealloc -{ - utf8Bytes = NULL; // Break reference loops - byteLen = 0; - charLen = 0; - hasHash = NO; - DEALLOC -} - - (void) getCharacters: (unichar*)buffer range: (NSRange)aRange { diff --git a/SQLClientPool.m b/SQLClientPool.m index 1f5fffd..9849c63 100644 --- a/SQLClientPool.m +++ b/SQLClientPool.m @@ -893,7 +893,7 @@ static Class cls = Nil; */ locked = [_lock tryLockWhenCondition: 1]; } - else if ([when earlierDate: until] == until) + else if ([when earlierDate: until] != when) { locked = [_lock lockWhenCondition: 1 beforeDate: until]; }