Index: src/OFArray.h
==================================================================
--- src/OFArray.h
+++ src/OFArray.h
@@ -120,10 +120,13 @@
*/
- (id*)cArray;
/**
* Returns a specific object of the array.
+ *
+ * The returned object is not retained and autoreleased for performance
+ * reasons!
*
* \param index The number of the object to return
* \return The specified object of the OFArray
*/
- (id)objectAtIndex: (size_t)index;
@@ -146,15 +149,25 @@
* the specified object
*/
- (size_t)indexOfObjectIdenticalTo: (OFObject*)obj;
/**
+ * Returns the first object of the array or nil.
+ *
+ * The returned object is not retained and autoreleased for performance
+ * reasons!
+ *
* \return The first object of the array or nil
*/
- (id)firstObject;
/**
+ * Returns the last object of the array or nil.
+ *
+ * The returned object is not retained and autoreleased for performance
+ * reasons!
+ *
* \return The last object of the array or nil
*/
- (id)lastObject;
/**
Index: src/OFDictionary.h
==================================================================
--- src/OFDictionary.h
+++ src/OFDictionary.h
@@ -140,10 +140,15 @@
*/
- initWithKey: (OFObject *)first
argList: (va_list)args;
/**
+ * Returns the object for the given key or nil if the key was not found.
+ *
+ * The returned object is not retained and autoreleased for performance
+ * reasons!
+ *
* \param key The key whose object should be returned
* \return The object for the given key or nil if the key was not found
*/
- (id)objectForKey: (OFObject *)key;
Index: src/OFThread.h
==================================================================
--- src/OFThread.h
+++ src/OFThread.h
@@ -90,10 +90,13 @@
+ (id)setObject: (OFObject*)obj
forTLSKey: (OFTLSKey*)key;
/**
* Returns the object for the specified Thread Local Storage key.
+ *
+ * The returned object is not retained and autoreleased for performance
+ * reasons!
*
* \param key The Thread Local Storage key
*/
+ (id)objectForTLSKey: (OFTLSKey*)key;
Index: src/OFThread.m
==================================================================
--- src/OFThread.m
+++ src/OFThread.m
@@ -80,11 +80,11 @@
return [old autorelease];
}
+ (id)objectForTLSKey: (OFTLSKey*)key
{
- return [[of_tlskey_get(key->key) retain] autorelease];
+ return of_tlskey_get(key->key);
}
+ (OFThread*)currentThread
{
return of_tlskey_get(thread_self);