Comment: | Use extern "C" where useful. Improves ObjC++ compatibility. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
03d1b71d10c54662dc03bb677e68f9cc |
User & Date: | js on 2011-02-01 22:11:48 |
Other Links: | manifest | tags |
2011-02-01
| ||
22:18 | Show milliseconds in of_log output. check-in: f3bfba9d06 user: js tags: trunk | |
22:11 |
Use extern "C" where useful. Improves ObjC++ compatibility. check-in: 03d1b71d10 user: js tags: trunk | |
21:47 | Get rid of another ObjC++ warning. check-in: 9d9881f26c user: js tags: trunk | |
Modified src/OFApplication.h from [d154d81fb9] to [f1e2ce1411].
︙ | ︙ | |||
161 162 163 164 165 166 167 168 | */ - (void)terminateWithStatus: (int)status; @end @interface OFObject (OFApplicationDelegate) <OFApplicationDelegate> @end extern int of_application_main(int*, char**[], Class); | > > > > > > | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | */ - (void)terminateWithStatus: (int)status; @end @interface OFObject (OFApplicationDelegate) <OFApplicationDelegate> @end #ifdef __cplusplus extern "C" { #endif extern int of_application_main(int*, char**[], Class); #ifdef __cplusplus } #endif |
Modified src/OFBlock.h from [966a359b27] to [bf216ad41d].
︙ | ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | OF_BLOCK_FIELD_IS_OBJECT = 3, OF_BLOCK_FIELD_IS_BLOCK = 7, OF_BLOCK_FIELD_IS_BYREF = 8, OF_BLOCK_FIELD_IS_WEAK = 16, OF_BLOCK_BYREF_CALLER = 128, }; extern void* _Block_copy(const void*); extern void _Block_release(const void*); #ifndef Block_copy # define Block_copy(x) ((__typeof__(x))_Block_copy((const void*)(x))) #endif #ifndef Block_release # define Block_release(x) _Block_release((const void*)(x)) #endif | > > > > > > | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | OF_BLOCK_FIELD_IS_OBJECT = 3, OF_BLOCK_FIELD_IS_BLOCK = 7, OF_BLOCK_FIELD_IS_BYREF = 8, OF_BLOCK_FIELD_IS_WEAK = 16, OF_BLOCK_BYREF_CALLER = 128, }; #ifdef __cplusplus extern "C" { #endif extern void* _Block_copy(const void*); extern void _Block_release(const void*); #ifdef __cplusplus } #endif #ifndef Block_copy # define Block_copy(x) ((__typeof__(x))_Block_copy((const void*)(x))) #endif #ifndef Block_release # define Block_release(x) _Block_release((const void*)(x)) #endif |
︙ | ︙ |
Modified src/OFConstantString.h from [a1a961b40a] to [90fda79f41].
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" #ifdef OF_APPLE_RUNTIME extern void *_OFConstantStringClassReference; #endif /** * \brief A class for storing constant strings using the \@"" literal. */ @interface OFConstantString: OFString @end | > > > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" #ifdef OF_APPLE_RUNTIME # ifdef __cplusplus extern "C" { #endif extern void *_OFConstantStringClassReference; # ifdef __cplusplus } #endif #endif /** * \brief A class for storing constant strings using the \@"" literal. */ @interface OFConstantString: OFString @end |
Modified src/OFDictionary.h from [646dc039c0] to [6931285817].
︙ | ︙ | |||
211 212 213 214 215 216 217 218 | @end @interface OFDictionaryKeyEnumerator: OFDictionaryEnumerator @end #import "OFMutableDictionary.h" extern struct of_dictionary_bucket of_dictionary_deleted_bucket; | > > > > > > | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | @end @interface OFDictionaryKeyEnumerator: OFDictionaryEnumerator @end #import "OFMutableDictionary.h" #ifdef __cplusplus extern "C" { #endif extern struct of_dictionary_bucket of_dictionary_deleted_bucket; #ifdef __cplusplus } #endif |
Modified src/OFFile.h from [4e34f334ab] to [c3892e8bd0].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include <sys/types.h> #import "OFSeekableStream.h" @class OFArray; @class OFDate; extern void of_log(OFConstantString*, ...); /** * \brief A class which provides functions to read, write and manipulate files. */ @interface OFFile: OFSeekableStream { int fd; | > > > > > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #include <sys/types.h> #import "OFSeekableStream.h" @class OFArray; @class OFDate; #ifdef __cplusplus extern "C" { #endif extern void of_log(OFConstantString*, ...); #ifdef __cplusplus } #endif /** * \brief A class which provides functions to read, write and manipulate files. */ @interface OFFile: OFSeekableStream { int fd; |
︙ | ︙ | |||
202 203 204 205 206 207 208 209 210 211 | * * \param fd A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! */ - initWithFileDescriptor: (int)fd; @end extern OFFile *of_stdin; extern OFFile *of_stdout; extern OFFile *of_stderr; | > > > > > > | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | * * \param fd A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! */ - initWithFileDescriptor: (int)fd; @end #ifdef __cplusplus extern "C" { #endif extern OFFile *of_stdin; extern OFFile *of_stdout; extern OFFile *of_stderr; #ifdef __cplusplus } #endif |
Modified src/OFObject.h from [f957d3ca64] to [89e99f7304].
︙ | ︙ | |||
404 405 406 407 408 409 410 411 | * * \param obj An object to compare the object to * \return The result of the comparison */ - (of_comparison_result_t)compare: (id)obj; @end extern size_t of_pagesize; | > > > > > > | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | * * \param obj An object to compare the object to * \return The result of the comparison */ - (of_comparison_result_t)compare: (id)obj; @end #ifdef __cplusplus extern "C" { #endif extern size_t of_pagesize; #ifdef __cplusplus } #endif |
Modified src/OFString+Hashing.h from [82d6ae107e] to [47219e07e4].
︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" extern int _OFString_Hashing_reference; /** * The OFString (OFHashing) category provides methods to calculate hashes for * strings. */ @interface OFString (Hashing) /** | > > > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" #ifdef __cplusplus extern "C" { #endif extern int _OFString_Hashing_reference; #ifdef __cplusplus } #endif /** * The OFString (OFHashing) category provides methods to calculate hashes for * strings. */ @interface OFString (Hashing) /** |
︙ | ︙ |
Modified src/OFString+URLEncoding.h from [61b9075dbb] to [f84eabd93c].
︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" extern int _OFString_URLEncoding_reference; /** * \brief A category which provides URL encoding and decoding. */ @interface OFString (URLEncoding) /** * Encodes a string for use in a URL. | > > > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" #ifdef __cplusplus extern "C" { #endif extern int _OFString_URLEncoding_reference; #ifdef __cplusplus } #endif /** * \brief A category which provides URL encoding and decoding. */ @interface OFString (URLEncoding) /** * Encodes a string for use in a URL. |
︙ | ︙ |
Modified src/OFString+XMLEscaping.h from [24a9987215] to [aa1e0ae685].
︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" extern int _OFString_XMLEscaping_reference; /** * \brief A category to escape strings for use in an XML document. */ @interface OFString (XMLEscaping) /** * Escapes a string for use in an XML document. * * \return A new autoreleased string */ - (OFString*)stringByXMLEscaping; @end | > > > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" #ifdef __cplusplus extern "C" { #endif extern int _OFString_XMLEscaping_reference; #ifdef __cplusplus } #endif /** * \brief A category to escape strings for use in an XML document. */ @interface OFString (XMLEscaping) /** * Escapes a string for use in an XML document. * * \return A new autoreleased string */ - (OFString*)stringByXMLEscaping; @end |
Modified src/OFString+XMLUnescaping.h from [7ef76c4fa8] to [180b3c909e].
︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" extern int _OFString_XMLUnescaping_reference; #ifdef OF_HAVE_BLOCKS typedef OFString* (^of_string_xml_unescaping_block_t)(OFString *str, OFString *entity); #endif /** | > > > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFString.h" #ifdef __cplusplus extern "C" { #endif extern int _OFString_XMLUnescaping_reference; #ifdef __cplusplus } #endif #ifdef OF_HAVE_BLOCKS typedef OFString* (^of_string_xml_unescaping_block_t)(OFString *str, OFString *entity); #endif /** |
︙ | ︙ |
Modified src/OFString.h from [78d3e88b84] to [6f22d22dfa].
︙ | ︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | typedef enum of_string_encoding_t { OF_STRING_ENCODING_UTF_8, OF_STRING_ENCODING_ISO_8859_1, OF_STRING_ENCODING_ISO_8859_15, OF_STRING_ENCODING_WINDOWS_1252 } of_string_encoding_t; extern int of_string_check_utf8(const char*, size_t); extern size_t of_string_unicode_to_utf8(of_unichar_t, char*); extern size_t of_string_utf8_to_unicode(const char*, size_t, of_unichar_t*); extern size_t of_string_position_to_index(const char*, size_t); extern size_t of_string_index_to_position(const char*, size_t, size_t); @class OFArray; /** * \brief A class for handling strings. */ @interface OFString: OFObject <OFCopying, OFMutableCopying, OFComparing> | > > > > > > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | typedef enum of_string_encoding_t { OF_STRING_ENCODING_UTF_8, OF_STRING_ENCODING_ISO_8859_1, OF_STRING_ENCODING_ISO_8859_15, OF_STRING_ENCODING_WINDOWS_1252 } of_string_encoding_t; #ifdef __cplusplus extern "C" { #endif extern int of_string_check_utf8(const char*, size_t); extern size_t of_string_unicode_to_utf8(of_unichar_t, char*); extern size_t of_string_utf8_to_unicode(const char*, size_t, of_unichar_t*); extern size_t of_string_position_to_index(const char*, size_t); extern size_t of_string_index_to_position(const char*, size_t, size_t); #ifdef __cplusplus } #endif @class OFArray; /** * \brief A class for handling strings. */ @interface OFString: OFObject <OFCopying, OFMutableCopying, OFComparing> |
︙ | ︙ |
Modified src/asprintf.h from [99ea7e8ec1] to [d3b2338fa7].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 | */ #import "objfw-defs.h" #ifndef OF_HAVE_ASPRINTF # include <stdarg.h> extern int asprintf(char**, const char*, ...); extern int vasprintf(char**, const char*, va_list); #endif | > > > > > > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #import "objfw-defs.h" #ifndef OF_HAVE_ASPRINTF # include <stdarg.h> # ifdef __cplusplus extern "C" { # endif extern int asprintf(char**, const char*, ...); extern int vasprintf(char**, const char*, va_list); # ifdef __cplusplus } # endif #endif |
Modified src/of_asprintf.h from [8c49ad9e92] to [84e7b68982].
︙ | ︙ | |||
14 15 16 17 18 19 20 21 22 | * file. */ #include <stdarg.h> #import "macros.h" extern int of_asprintf(char**, const char*, ...); extern int of_vasprintf(char**, const char*, va_list); | > > > > > > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #include <stdarg.h> #import "macros.h" #ifdef __cplusplus extern "C" { #endif extern int of_asprintf(char**, const char*, ...); extern int of_vasprintf(char**, const char*, va_list); #ifdef __cplusplus } #endif |
Modified src/unicode.h from [73a6caeddf] to [acdf178c98].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 | #import "OFString.h" #define OF_UNICODE_UPPER_TABLE_SIZE 0x105 #define OF_UNICODE_LOWER_TABLE_SIZE 0x105 #define OF_UNICODE_CASEFOLDING_TABLE_SIZE 0x105 extern const of_unichar_t* const of_unicode_upper_table[OF_UNICODE_UPPER_TABLE_SIZE]; extern const of_unichar_t* const of_unicode_lower_table[OF_UNICODE_LOWER_TABLE_SIZE]; extern const of_unichar_t* const of_unicode_casefolding_table[OF_UNICODE_CASEFOLDING_TABLE_SIZE]; | > > > > > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #import "OFString.h" #define OF_UNICODE_UPPER_TABLE_SIZE 0x105 #define OF_UNICODE_LOWER_TABLE_SIZE 0x105 #define OF_UNICODE_CASEFOLDING_TABLE_SIZE 0x105 #ifdef __cplusplus extern "C" { #endif extern const of_unichar_t* const of_unicode_upper_table[OF_UNICODE_UPPER_TABLE_SIZE]; extern const of_unichar_t* const of_unicode_lower_table[OF_UNICODE_LOWER_TABLE_SIZE]; extern const of_unichar_t* const of_unicode_casefolding_table[OF_UNICODE_CASEFOLDING_TABLE_SIZE]; #ifdef __cplusplus } #endif |