summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@webkeks.org>2009-12-24 10:19:02 +0100
committerJonathan Schleifer <js@webkeks.org>2009-12-24 10:19:02 +0100
commit6c054bf8cd6ee722ec5a6a63088076c4ba2ffbb2 (patch)
treef288568af8e7df2f14f9c4d59d43511c261c6943
parent3da6db532cfe27a5fb79a1015a738a16edd3e124 (diff)
parent0dfbc0da866853447be1e94c8e492a5e47cab101 (diff)
Merge latest changes from default branch to 0.1 branch.0.1-release
-rw-r--r--configure.ac3
-rw-r--r--extra.mk.in1
-rw-r--r--generators/TableGenerator.h3
-rw-r--r--generators/TableGenerator.m15
-rw-r--r--src/OFArray.h16
-rw-r--r--src/OFAutoreleasePool.h5
-rw-r--r--src/OFConstString.h2
-rw-r--r--src/OFConstString.m2
-rw-r--r--src/OFDataArray.h7
-rw-r--r--src/OFDictionary.h2
-rw-r--r--src/OFDictionary.m14
-rw-r--r--src/OFExceptions.h2
-rw-r--r--src/OFFile.h6
-rw-r--r--src/OFFile.m3
-rw-r--r--src/OFHashes.h4
-rw-r--r--src/OFMutableArray.h4
-rw-r--r--src/OFMutableDictionary.h2
-rw-r--r--src/OFThread.h2
-rw-r--r--tests/Makefile2
-rw-r--r--tests/objc_sync/Makefile1
20 files changed, 44 insertions, 52 deletions
diff --git a/configure.ac b/configure.ac
index e2334394..c03a731e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,8 +51,7 @@ fi
AC_C_BIGENDIAN([
AC_DEFINE(OF_BIG_ENDIAN, 1, [Whether we are big endian])
- AC_SUBST(ENDIANESS_DEF, "-DOF_BIG_ENDIAN")
- ])
+ AC_SUBST(ENDIANESS_DEF, "-DOF_BIG_ENDIAN")])
AC_MSG_CHECKING(for SIZE_MAX)
AC_EGREP_CPP(yes, [
diff --git a/extra.mk.in b/extra.mk.in
index eeb699f6..ed437430 100644
--- a/extra.mk.in
+++ b/extra.mk.in
@@ -3,7 +3,6 @@ OBJC_SYNC_M = @OBJC_SYNC_M@
OFPLUGIN_M = @OFPLUGIN_M@
OFTHREAD_M = @OFTHREAD_M@
TESTPLUGIN = @TESTPLUGIN@
-WS2_LIBS = @WS2_LIBS@
TESTS = @TESTS@
TEST_LAUNCHER = @TEST_LAUNCHER@
THREADING_H = @THREADING_H@
diff --git a/generators/TableGenerator.h b/generators/TableGenerator.h
index 4ad5f568..11d6bc97 100644
--- a/generators/TableGenerator.h
+++ b/generators/TableGenerator.h
@@ -16,6 +16,9 @@
of_unichar_t upper[0x110000];
of_unichar_t lower[0x110000];
of_unichar_t casefolding[0x110000];
+ BOOL upper_table_used[0x1100];
+ BOOL lower_table_used[0x1100];
+ BOOL casefolding_table_used[0x1100];
size_t upper_size;
size_t lower_size;
size_t casefolding_size;
diff --git a/generators/TableGenerator.m b/generators/TableGenerator.m
index 7c6d9c58..912b0dc2 100644
--- a/generators/TableGenerator.m
+++ b/generators/TableGenerator.m
@@ -105,20 +105,9 @@
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init], *pool2;
of_unichar_t i, j;
- BOOL *upper_table_used;
- BOOL *lower_table_used;
- char *casefolding_table_used;
OFFile *f = [OFFile fileWithPath: file
mode: @"wb"];
- upper_table_used = [self allocMemoryWithSize: 0x1100];
- lower_table_used = [self allocMemoryWithSize: 0x1100];
- casefolding_table_used = [self allocMemoryWithSize: 0x1100];
-
- memset(upper_table_used, 0, 0x1100);
- memset(lower_table_used, 0, 0x1100);
- memset(casefolding_table_used, 0, 0x1100);
-
[f writeString: COPYRIGHT
@"#include \"config.h\"\n"
@"\n"
@@ -305,10 +294,6 @@
[f writeString: @"\n};\n"];
- [self freeMemory: upper_table_used];
- [self freeMemory: lower_table_used];
- [self freeMemory: casefolding_table_used];
-
[pool release];
}
diff --git a/src/OFArray.h b/src/OFArray.h
index 87e6180f..f13c6815 100644
--- a/src/OFArray.h
+++ b/src/OFArray.h
@@ -17,7 +17,7 @@
@class OFString;
/**
- * The OFArray class provides a class for storing objects in an array.
+ * The OFArray class is a class for storing objects in an array.
*/
@interface OFArray: OFObject <OFCopying, OFMutableCopying>
{
@@ -30,18 +30,24 @@
+ array;
/**
+ * Creates a new OFArray with the specified object.
+ *
* \param obj An object
* \return A new autoreleased OFArray
*/
+ arrayWithObject: (OFObject*)obj;
/**
+ * Creates a new OFArray with the specified objects, terminated by nil.
+ *
* \param first The first object in the array
* \return A new autoreleased OFArray
*/
+ arrayWithObjects: (OFObject*)first, ...;
/**
+ * Creates a new OFArray with the objects from the specified C array.
+ *
* \param objs A C array of objects.
* \return A new autoreleased OFArray
*/
@@ -82,7 +88,7 @@
- initWithCArray: (OFObject**)objs;
/**
- * \return The number of objects in the OFArray
+ * \return The number of objects in the array
*/
- (size_t)count;
@@ -92,7 +98,7 @@
- (id*)cArray;
/**
- * Returns a specific object of the OFArray.
+ * Returns a specific object of the array.
*
* \param index The number of the object to return
* \return The specified object of the OFArray
@@ -119,12 +125,12 @@
- (size_t)indexOfObjectIdenticalTo: (OFObject*)obj;
/**
- * \return The first object of the OFArray or nil
+ * \return The first object of the array or nil
*/
- (id)firstObject;
/**
- * \return The last object of the OFArray or nil
+ * \return The last object of the array or nil
*/
- (id)lastObject;
diff --git a/src/OFAutoreleasePool.h b/src/OFAutoreleasePool.h
index 02026ff7..975b0bc4 100644
--- a/src/OFAutoreleasePool.h
+++ b/src/OFAutoreleasePool.h
@@ -14,8 +14,9 @@
#import "OFList.h"
/**
- * The OFAutoreleasePool class provides a class that keeps track of objects
- * that will be released when the autorelease pool is released.
+ * The OFAutoreleasePool class is a class that keeps track of objects that will
+ * be released when the autorelease pool is released.
+ *
* Every thread has its own stack of autorelease pools.
*/
@interface OFAutoreleasePool: OFObject
diff --git a/src/OFConstString.h b/src/OFConstString.h
index d7b5ce18..917a23e0 100644
--- a/src/OFConstString.h
+++ b/src/OFConstString.h
@@ -16,7 +16,7 @@ extern void *_OFConstStringClassReference;
#endif
/**
- * A class for storing static strings using the @"" literal.
+ * A class for storing constant strings using the @"" literal.
*/
@interface OFConstString: OFString {}
@end
diff --git a/src/OFConstString.m b/src/OFConstString.m
index bf4d8e71..9b7aa405 100644
--- a/src/OFConstString.m
+++ b/src/OFConstString.m
@@ -151,6 +151,6 @@ void *_OFConstStringClassReference;
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
- [super dealloc]; /* Get rid of stupid warning */
+ [super dealloc]; /* Get rid of a stupid warning */
}
@end
diff --git a/src/OFDataArray.h b/src/OFDataArray.h
index b0b1366c..b8748e50 100644
--- a/src/OFDataArray.h
+++ b/src/OFDataArray.h
@@ -12,8 +12,7 @@
#import "OFObject.h"
/**
- * The OFDataArray class provides a class for storing arbitrary data in an
- * array.
+ * The OFDataArray class is a class for storing arbitrary data in an array.
*
* If you plan to store large hunks of data, you should consider using
* OFBigDataArray, which allocates the memory in pages rather than in bytes.
@@ -144,8 +143,8 @@
@end
/**
- * The OFBigDataArray class provides a class for storing arbitrary data in an
- * array and is designed to store large hunks of data. Therefore, it allocates
+ * The OFBigDataArray class is a class for storing arbitrary data in an array
+ * and is designed to store large hunks of data. Therefore, it allocates
* memory in pages rather than a chunk of memory for each item.
*/
@interface OFBigDataArray: OFDataArray <OFCopying>
diff --git a/src/OFDictionary.h b/src/OFDictionary.h
index fbd94141..44d9ad3d 100644
--- a/src/OFDictionary.h
+++ b/src/OFDictionary.h
@@ -22,7 +22,7 @@ struct of_dictionary_bucket
};
/**
- * The OFDictionary class provides a class for using hash tables.
+ * The OFDictionary class is a class for using hash tables.
*/
@interface OFDictionary: OFObject <OFCopying, OFMutableCopying>
{
diff --git a/src/OFDictionary.m b/src/OFDictionary.m
index 45a02581..fbda04ad 100644
--- a/src/OFDictionary.m
+++ b/src/OFDictionary.m
@@ -135,8 +135,8 @@ void _references_to_categories_of_OFDictionary()
@try {
[dict->data[i].object retain];
} @catch (OFException *e) {
- [self dealloc];
[key release];
+ [self dealloc];
@throw e;
}
@@ -163,8 +163,8 @@ void _references_to_categories_of_OFDictionary()
@try {
[obj retain];
} @catch (OFException *e) {
- [self dealloc];
[key release];
+ [self dealloc];
@throw e;
}
@@ -246,8 +246,8 @@ void _references_to_categories_of_OFDictionary()
@try {
[objs_carray[i] retain];
} @catch (OFException *e) {
- [self dealloc];
[key release];
+ [self dealloc];
@throw e;
}
@@ -273,8 +273,8 @@ void _references_to_categories_of_OFDictionary()
@try {
[data[j].object release];
} @catch (OFException *e) {
- [self dealloc];
[objs_carray[i] release];
+ [self dealloc];
@throw e;
}
@@ -357,8 +357,8 @@ void _references_to_categories_of_OFDictionary()
@try {
[obj retain];
} @catch (OFException *e) {
- [self dealloc];
[key release];
+ [self dealloc];
@throw e;
}
@@ -412,8 +412,8 @@ void _references_to_categories_of_OFDictionary()
@try {
[obj retain];
} @catch (OFException *e) {
- [self dealloc];
[key release];
+ [self dealloc];
@throw e;
}
@@ -439,8 +439,8 @@ void _references_to_categories_of_OFDictionary()
@try {
[data[j].object release];
} @catch (OFException *e) {
- [self dealloc];
[obj release];
+ [self dealloc];
@throw e;
}
diff --git a/src/OFExceptions.h b/src/OFExceptions.h
index 56e98a61..cc35847f 100644
--- a/src/OFExceptions.h
+++ b/src/OFExceptions.h
@@ -312,7 +312,7 @@
@end
/**
- * An OFException indicating a read to the file failed.
+ * An OFException indicating a read on the file failed.
*/
@interface OFReadFailedException: OFReadOrWriteFailedException {}
@end
diff --git a/src/OFFile.h b/src/OFFile.h
index ae8c4fa2..c99a75c3 100644
--- a/src/OFFile.h
+++ b/src/OFFile.h
@@ -131,9 +131,9 @@ typedef int gid_t;
@interface OFFileSingleton: OFFile
@end
-/// An OFFile object for stdin.
+/// An OFFile object for stdin
extern OFFile *of_stdin;
-/// An OFFile object for stdout.
+/// An OFFile object for stdout
extern OFFile *of_stdout;
-/// An OFFile object for stderr.
+/// An OFFile object for stderr
extern OFFile *of_stderr;
diff --git a/src/OFFile.m b/src/OFFile.m
index 25856927..fcd2b6a2 100644
--- a/src/OFFile.m
+++ b/src/OFFile.m
@@ -92,6 +92,9 @@ OFFile *of_stderr = nil;
path: path
owner: owner
group: group];
+#else
+ @throw [OFNotImplementedException newWithClass: self
+ selector: _cmd];
#endif
}
diff --git a/src/OFHashes.h b/src/OFHashes.h
index d1cbeaa7..5856735f 100644
--- a/src/OFHashes.h
+++ b/src/OFHashes.h
@@ -34,8 +34,6 @@ extern int _OFHashing_reference;
*/
+ md5Hash;
-- init;
-
/**
* Adds a buffer to the hash to be calculated.
*
@@ -70,8 +68,6 @@ extern int _OFHashing_reference;
*/
+ sha1Hash;
-- init;
-
/**
* Adds a buffer to the hash to be calculated.
*
diff --git a/src/OFMutableArray.h b/src/OFMutableArray.h
index 4f193139..4a7b52e0 100644
--- a/src/OFMutableArray.h
+++ b/src/OFMutableArray.h
@@ -12,8 +12,8 @@
#import "OFArray.h"
/**
- * The OFMutableArray class provides a class for storing, adding and removing
- * objects in an array.
+ * The OFMutableArray class is a class for storing, adding and removing objects
+ * in an array.
*/
@interface OFMutableArray: OFArray {}
/**
diff --git a/src/OFMutableDictionary.h b/src/OFMutableDictionary.h
index 9b29b1d6..ee7cf3be 100644
--- a/src/OFMutableDictionary.h
+++ b/src/OFMutableDictionary.h
@@ -12,7 +12,7 @@
#import "OFDictionary.h"
/**
- * The OFMutableDictionary class provides a class for using mutable hash tables.
+ * The OFMutableDictionary class is a class for using mutable hash tables.
*/
@interface OFMutableDictionary: OFDictionary {}
/**
diff --git a/src/OFThread.h b/src/OFThread.h
index ce3dafb6..5a82b7c9 100644
--- a/src/OFThread.h
+++ b/src/OFThread.h
@@ -59,7 +59,7 @@
*/
@interface OFThread: OFObject
{
- OFObject <OFCopying> *object;
+ id object;
of_thread_t thread;
BOOL running;
diff --git a/tests/Makefile b/tests/Makefile
index d64f7282..8ac1d49f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -18,7 +18,7 @@ SRCS = OFArray.m \
IPHONE_USER = mobile
IPHONE_TMP = /tmp/objfw-test
-.PHONY: run run-tests
+.PHONY: run run-tests run-on-iphone
run: all
if [ -z "${DONT_RUN_TESTS}" ]; then ${MAKE} ${MFLAGS} run-tests; fi
diff --git a/tests/objc_sync/Makefile b/tests/objc_sync/Makefile
index 14344b8e..1a11ac32 100644
--- a/tests/objc_sync/Makefile
+++ b/tests/objc_sync/Makefile
@@ -24,3 +24,4 @@ include ../../buildsys.mk
CPPFLAGS += -I../../src -I../..
LIBS := -L../../src -lobjfw ${LIBS}
+LD = ${OBJC}