Overview
Comment: | Add missing const for some return types; new exception. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
46b770d0665fa6510357f09e4dacddd5 |
User & Date: | js on 2008-12-13 14:50:29 |
Other Links: | manifest | tags |
Context
2008-12-13
| ||
14:52 | Fix 2 FIXMEs in OFTCPSocket. check-in: 7d05cee843 user: js tags: trunk | |
14:50 | Add missing const for some return types; new exception. check-in: 46b770d066 user: js tags: trunk | |
13:52 | On some systems, localhost doesn't work for IPv6, thus use ::1. check-in: add10740d1 user: js tags: trunk | |
Changes
Modified src/OFExceptions.h from [f063fde1b6] to [78a34e9941].
︙ | |||
42 43 44 45 46 47 48 | 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 157 158 159 160 161 162 | - + - - - + - - - + - + - + - - | * \return The object that caused the exception */ - (id)object; /** * \return An error message for the exception as a C String */ |
︙ | |||
181 182 183 184 185 186 187 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + | andMode: (const char*)m; - free; /** * \return An error message for the exception as a C String */ |
︙ | |||
205 206 207 208 209 210 211 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - - - - | { size_t req_size; size_t req_items; BOOL has_items; } /** |
︙ | |||
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | + + + + + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | */ - (size_t)requestedSize; /** * \return The requested number of items that coudln't be read / written */ - (size_t)requestedItems; /** * \return Whether NItems was specified */ - (BOOL)hasNItems; @end /** * An OFException indicating a read to the file failed. */ @interface OFReadFailedException: OFReadOrWriteFailedException {} /** * \return An error message for the exception as a C String */ |
Modified src/OFExceptions.m from [c1fe9bf0a6] to [a965c66066].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + | } - (id)object { return object; } |
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + | { if ((self = [super initWithObject: obj])) req_size = size; return self; } |
︙ | |||
110 111 112 113 114 115 116 | 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 157 | - + - + - + | { if ((self = [super initWithObject: obj])) pointer = ptr; return self; } |
︙ | |||
170 171 172 173 174 175 176 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | - - + + - + | } - initWithObject: (id)obj andPath: (const char*)p andMode: (const char*)m { if ((self = [super initWithObject: obj])) { |
︙ | |||
260 261 262 263 264 265 266 267 268 269 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 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 396 397 398 399 400 401 402 403 404 | + + + + + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | return req_size; } - (size_t)requestedItems { return req_items; } - (BOOL)hasNItems { return has_items; } @end @implementation OFReadFailedException |
Modified src/OFString.h from [02ec2a897c] to [d8d41ef5ac].
︙ | |||
64 65 66 67 68 69 70 | 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 | - - - - - - - + + + + + + + | * Initializes an already allocated OFString from a wide C string. * * \param str A wide C string to initialize the OFString with * \return An initialized OFString */ - initFromWideCString: (const wchar_t*)str; |
︙ |
Modified src/OFString.m from [f6358fc52b] to [9f7f197b86].
︙ | |||
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 | 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 | + + + + + + + + + + - - - - - - - - - - | ofSize: sizeof(wchar_t)]; wmemcpy(string, str, length + 1); } } return self; } - (const wchar_t*)wideCString { return string; } - (size_t)length { return length; } - (char*)getCString { char *str; size_t len; if ((len = wcstombs(NULL, string, 0)) == (size_t)-1) @throw [OFCharsetConversionFailedException newWithObject: self]; str = [self getMemWithSize: len + 1]; if (wcstombs(str, string, len + 1) != len) { [self freeMem: str]; @throw [OFCharsetConversionFailedException newWithObject: self]; } return str; } |
︙ |