Overview
Context
Changes
Modified README
from [9edbf03130]
to [c99d17394d].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
|
USING THE MAC OS X FRAMWORK IN XCODE
To use the Mac OS X framework in Xcode, you need to add the .framework
to your project and add the following flags to "Other C Flags":
-fconstant-string-class=OFConstString -fno-constant-cfstrings
-fconstant-string-class=OFConstantString -fno-constant-cfstrings
BUGS AND FEATURE REQUESTS
If you find any bugs or have feature requests, feel free to send a
mail to js-spam@webkeks.org (remove -spam from the address!).
|
Modified configure.ac
from [a82a96cd8d]
to [fb70c594a6].
︙ | | |
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
-
+
|
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_EGREP
CPP="$OBJCPP"
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS"
OBJCFLAGS="$OBJCFLAGS -Wall -fexceptions -fobjc-exceptions"
OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstString"
OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString"
AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"])
AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [
NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"])
AC_SUBST(NO_CONST_CFSTRINGS)
|
︙ | | |
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
-
+
-
+
-
+
|
if test x"$GOBJC" = x"yes"; then
OBJCFLAGS="$OBJCFLAGS -Werror"
AC_MSG_CHECKING(whether gcc has bug objc/27438)
AC_TRY_COMPILE([
#import <objc/objc.h>
@interface OFConstString
@interface OFConstantString
{
Class isa;
const char *string;
unsigned long size;
}
@end
void *_OFConstStringClassReference;
void *_OFConstantStringClassReference;
], [
OFConstString *test = @"";
OFConstantString *test = @"";
test++; /* Get rid of unused variable warning */
], [AC_MSG_RESULT(no)], [
AC_MSG_RESULT([yes, adding -Wno-unused-variable])
OBJCFLAGS="$OBJCFLAGS -Wno-unused-variable"
AC_SUBST(NO_WARN_UNUSED, "-Wno-unused-variable")])
AC_MSG_CHECKING(whether we need -Wno-strict-aliasing due to gcc bugs)
|
︙ | | |
Modified src/Makefile
from [b2d5824793]
to [a78e57c409].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
-
+
|
include ../extra.mk
LIB = ${OBJFW_SHARED_LIB}
LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}
STATIC_LIB = ${OBJFW_STATIC_LIB}
SRCS = OFApplication.m \
OFArray.m \
OFAutoreleasePool.m \
OFConstString.m \
OFConstantString.m \
OFDataArray.m \
OFDictionary.m \
OFExceptions.m \
OFFile.m \
OFHash.m \
OFEnumerator.m \
OFList.m \
|
︙ | | |
Deleted src/OFConstString.h version [2d731ff292].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
/*
* Copyright (c) 2008 - 2010
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE included in
* the packaging of this file.
*/
#import "OFString.h"
#ifdef OF_APPLE_RUNTIME
extern void *_OFConstStringClassReference;
#endif
/**
* \brief A class for storing constant strings using the \@"" literal.
*/
@interface OFConstString: OFString {}
@end
|
Deleted src/OFConstString.m version [6da12923e2].
1
2
3
4
5
6
7
8
9
10
11
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
/*
* Copyright (c) 2008 - 2010
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE included in
* the packaging of this file.
*/
#include "config.h"
#import "OFConstString.h"
#import "OFExceptions.h"
#ifdef OF_APPLE_RUNTIME
# import <objc/runtime.h>
void *_OFConstStringClassReference;
#endif
@implementation OFConstString
#ifdef OF_APPLE_RUNTIME
+ (void)load
{
objc_setFutureClass((Class)&_OFConstStringClassReference,
"OFConstString");
}
#endif
+ alloc
{
@throw [OFNotImplementedException newWithClass: self
selector: _cmd];
}
- init
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- initWithCString: (const char*)str
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- initWithCString: (const char*)str
encoding: (enum of_string_encoding)encoding;
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- initWithCString: (const char*)str
encoding: (enum of_string_encoding)encoding
length: (size_t)len
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- initWithCString: (const char*)str
length: (size_t)len
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- initWithFormat: (OFString*)fmt, ...
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- initWithFormat: (OFString*)fmt
arguments: (va_list)args
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- initWithString: (OFString*)str
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (void)addMemoryToPool: (void*)ptr
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (void*)allocMemoryWithSize: (size_t)size
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (void*)allocMemoryForNItems: (size_t)nitems
withSize: (size_t)size
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (void*)resizeMemory: (void*)ptr
toSize: (size_t)size
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (void*)resizeMemory: (void*)ptr
toNItems: (size_t)nitems
withSize: (size_t)size
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (void)freeMemory: (void*)ptr
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- retain
{
return self;
}
- autorelease
{
return self;
}
- (size_t)retainCount
{
return SIZE_MAX;
}
- (void)release
{
}
- (void)dealloc
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
[super dealloc]; /* Get rid of a stupid warning */
}
@end
|
Added src/OFConstantString.h version [5a76a73ac7].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
/*
* Copyright (c) 2008 - 2010
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE 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
|
| | | | | | | | | | | | | | | | | | | | |
Added src/OFConstantString.m version [d070e3d08a].