Comment: | Remove dummy implementations for formal protocols. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
89177dcd091bca285c2c27f47016dff0 |
User & Date: | js on 2012-12-20 16:42:52 |
Other Links: | manifest | tags |
2012-12-22
| ||
14:41 | Never throw in -[typeEncodingForSelector:]. check-in: 77573bf01f user: js tags: trunk | |
2012-12-20
| ||
16:42 | Remove dummy implementations for formal protocols. check-in: 89177dcd09 user: js tags: trunk | |
15:11 | OFHTTPRequestResult: Fix a missing release. check-in: 4d636a1d00 user: js tags: trunk | |
Modified src/OFApplication.h from [f44a22ec3a] to [e7a89febd1].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - - - - | { \ return of_application_main(&argc, &argv, [cls class]); \ } /*! * @brief A protocol for delegates of OFApplication. */ |
︙ |
Modified src/OFApplication.m from [9867bc719f] to [c32b0e2937].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - - | * 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. */ #include "config.h" |
︙ | |||
44 45 46 47 48 49 50 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | + - + | static OFApplication *app = nil; static void atexit_handler(void) { id <OFApplicationDelegate> delegate = [app delegate]; if ([delegate respondsToSelector: @selector(applicationWillTerminate)]) |
︙ | |||
272 273 274 275 276 277 278 | 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | - - - - - - - - + + + + + + + + | return delegate; } - (void)setDelegate: (id <OFApplicationDelegate>)delegate_ { delegate = delegate_; |
︙ | |||
324 325 326 327 328 329 330 331 332 | 323 324 325 326 327 328 329 330 331 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - | - (void)dealloc { [arguments release]; [environment release]; [super dealloc]; } @end |
Modified src/OFHTTPClient.h from [0ec84f966d] to [f80794c7b1].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - - - - | @class OFTCPSocket; @class OFDictionary; @class OFDataArray; /*! * @brief A delegate for OFHTTPClient. */ |
︙ |
Modified src/OFHTTPClient.m from [9d0e6d26b7] to [993fb03183].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - - | * 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. */ #include "config.h" |
︙ | |||
148 149 150 151 152 153 154 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | + + - - - + + + | @throw [OFUnsupportedProtocolException exceptionWithClass: [self class] URL: URL]; sock = [[[of_tls_socket_class alloc] init] autorelease]; } if ([delegate respondsToSelector: @selector(client:didCreateSocket:request:)]) |
︙ | |||
294 295 296 297 298 299 300 | 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 | - + + + - - - + + + - + | if ((redirects > 0 && (status == 301 || status == 302 || status == 303 || status == 307) && [key isEqual: @"Location"]) && (insecureRedirectsAllowed || [scheme isEqual: @"http"] || ![value hasPrefix: @"http://"])) { OFURL *newURL; OFHTTPRequest *newRequest; |
︙ | |||
334 335 336 337 338 339 340 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | + + - - - - + + + + | redirects: redirects - 1]; } [serverHeaders setObject: value forKey: key]; } if ([delegate respondsToSelector: @selector(client:didReceiveHeaders:statusCode:request:)]) |
︙ | |||
394 395 396 397 398 399 400 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | + + + - - - - + + + + | while (toRead > 0) { size_t length = (toRead < of_pagesize ? toRead : of_pagesize); length = [sock readIntoBuffer: buffer length: length]; if ([delegate respondsToSelector: @selector(client:didReceiveData: length:request:)]) |
︙ | |||
433 434 435 436 437 438 439 | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | + + + - - - - + + + + | void *pool2; length = [sock readIntoBuffer: buffer length: of_pagesize]; pool2 = objc_autoreleasePoolPush(); if ([delegate respondsToSelector: @selector(client:didReceiveData:length: request:)]) |
︙ | |||
482 483 484 485 486 487 488 489 | 492 493 494 495 496 497 498 499 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | @throw [OFHTTPRequestFailedException exceptionWithClass: [self class] request: request result: result]; return result; } @end |
Modified src/OFHTTPServer.h from [43b8941dbf] to [3a94e6391a].
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + - - - | @class OFHTTPRequestResult; @class OFTCPSocket; @class OFException; /*! * @brief A delegate for OFHTTPServer. */ |
︙ | |||
135 136 137 138 139 140 141 | 132 133 134 135 136 137 138 | - - - | */ - (void)stop; - (BOOL)OF_socket: (OFTCPSocket*)socket didAcceptSocket: (OFTCPSocket*)clientSocket exception: (OFException*)exception; @end |
Modified src/OFHTTPServer.m from [91602836ad] to [0d0597589f].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - - | * 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. */ #include "config.h" |
︙ | |||
643 644 645 646 647 648 649 650 | 641 642 643 644 645 646 647 648 | - - - - - - - - - | [clientSocket asyncReadLineWithTarget: connection selector: @selector(socket:didReadLine: exception:)]; return YES; } @end |
Modified src/OFStreamObserver.h from [fa395911d4] to [0ddbd1118a].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - - - | @class OFDataArray; @class OFMutex; /*! * @brief A protocol that needs to be implemented by delegates for * OFStreamObserver. */ |
︙ |
Modified src/OFStreamObserver.m from [0c778cd456] to [df859b9099].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - | * 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. */ #include "config.h" |
︙ | |||
385 386 387 388 389 390 391 | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | + + + - + + + - - - - - - - - - - - - - - | BOOL foundInCache = NO; for (i = 0; i < count; i++) { if ([objects[i] pendingBytes] > 0 && ![objects[i] OF_isWaitingForDelimiter]) { void *pool = objc_autoreleasePoolPush(); if ([delegate respondsToSelector: @selector(streamIsReadyForReading:)]) |
Modified src/OFStreamObserver_kqueue.m from [c9bbb01ae1] to [d8e79884c0].
︙ | |||
155 156 157 158 159 160 161 | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | + + - - + + + + + - - + + + + - - + + | } realEvents++; pool = objc_autoreleasePoolPush(); if (eventList[i].flags & EV_ERROR) { if ([delegate respondsToSelector: @selector(streamDidReceiveException:)]) |
︙ |
Modified src/OFStreamObserver_poll.m from [c07acfe92a] to [9a6f7b90a8].
︙ | |||
157 158 159 160 161 162 163 | 157 158 159 160 161 162 163 164 165 166 167 168 169 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 | + - - - + + + + + + - - - + + + + + + - - - + + + + + | OF_ENSURE(read(cancelFD[0], &buffer, 1) > 0); FDs_[i].revents = 0; objc_autoreleasePoolPop(pool); continue; } if ([delegate respondsToSelector: |
Modified src/OFStreamObserver_select.m from [66f75ef514] to [8aa04560f5].
︙ | |||
125 126 127 128 129 130 131 | 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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | + - - + + + + + - - + + + + + + - - + + + + + - - + + + + + | for (i = 0; i < count; i++) { int fd = [objects[i] fileDescriptorForReading]; pool = objc_autoreleasePoolPush(); if (FD_ISSET(fd, &readFDs_)) { if ([delegate respondsToSelector: |
Modified src/OFXMLElementBuilder.h from [6c8ea67928] to [ffcae14fe5].
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - - - - | @class OFXMLElement; @class OFXMLElementBuilder; /*! * @brief A protocol that needs to be implemented by delegates for * OFXMLElementBuilder. */ |
︙ | |||
76 77 78 79 80 81 82 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + | * @param builder The builder which did not expect the close tag * @param name The name of the close tag * @param prefix The prefix of the close tag * @param ns The namespace of the close tag */ - (void)elementBuilder: (OFXMLElementBuilder*)builder didNotExpectCloseTag: (OFString*)name |
︙ |
Modified src/OFXMLElementBuilder.m from [5fb1759a2a] to [9a55332d3d].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - - | * 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. */ #include "config.h" |
︙ | |||
74 75 76 77 78 79 80 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | - + + - + | { OFXMLProcessingInstructions *node = [OFXMLProcessingInstructions processingInstructionsWithString: pi]; OFXMLElement *parent = [stack lastObject]; if (parent != nil) [parent addChild: node]; |
︙ | |||
114 115 116 117 118 119 120 | 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 | - + + + - - - - + + + + + + + + | [[stack lastObject] addChild: element]; [stack addObject: element]; } - (void)parser: (OFXMLParser*)parser didEndElement: (OFString*)name |
︙ | |||
144 145 146 147 148 149 150 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 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 | - + + - + + - + + - - + + - - - + - - - - - - - - - - - - - - - - - - - - - - + + | OFXMLElement *parent; node = [OFXMLCharacters charactersWithString: characters]; parent = [stack lastObject]; if (parent != nil) [parent addChild: node]; |
Modified src/OFXMLParser.h from [0c331b0934] to [b980bea64d].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - - - - | @class OFMutableArray; @class OFDataArray; @class OFStream; /*! * @brief A protocol that needs to be implemented by delegates for OFXMLParser. */ |
︙ | |||
54 55 56 57 58 59 60 | 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 | - + - + | * @param prefix The prefix of the tag which just started or nil * @param ns The namespace of the tag which just started or nil * @param attributes The attributes included in the tag which just started or * nil */ - (void)parser: (OFXMLParser*)parser didStartElement: (OFString*)name |
︙ |
Modified src/OFXMLParser.m from [4543342dd4] to [6b0673d037].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - - | * 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. */ #include "config.h" |
︙ | |||
333 334 335 336 337 338 339 | 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | + + - - + + | if ((length = *i - *last) > 0) cache_append(cache, buffer + *last, encoding, length); if ([cache count] > 0) { void *pool = objc_autoreleasePoolPush(); OFString *characters = transform_string(cache, 0, YES, self); if ([delegate respondsToSelector: @selector(parser:foundCharacters:)]) |
︙ | |||
501 502 503 504 505 506 507 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | + + - - + + | [pi hasPrefix: @"xml\t"] || [pi hasPrefix: @"xml\r"] || [pi hasPrefix: @"xml\n"]) if (![self OF_parseXMLProcessingInstructions: pi]) @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; if ([delegate respondsToSelector: @selector(parser:foundProcessingInstructions:)]) |
︙ | |||
560 561 562 563 564 565 566 | 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 | + + - - - - - + + + + + + + - - - - + + + + | ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException exceptionWithClass: [self class] prefix: prefix]; if ([delegate respondsToSelector: @selector(parser: didStartElement:prefix:namespace:attributes:)]) |
︙ | |||
647 648 649 650 651 652 653 | 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 | + + - - - - + + + + | ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException exceptionWithClass: [self class] prefix: prefix]; if ([delegate respondsToSelector: @selector(parser:didEndElement:prefix:namespace:)]) |
︙ | |||
705 706 707 708 709 710 711 | 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | + + - - - - - + + + + + + + - - - - + + + + | for (j = 0; j < attributesCount; j++) resolve_attribute_namespace(attributesObjects[j], namespaces, self); pool = objc_autoreleasePoolPush(); if ([delegate respondsToSelector: @selector(parser:didStartElement:prefix:namespace:attributes:)]) |
︙ | |||
948 949 950 951 952 953 954 | 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 | + - - + + | } pool = objc_autoreleasePoolPush(); cache_append(cache, buffer + *last, encoding, *i - *last); CDATA = transform_string(cache, 2, NO, nil); if ([delegate respondsToSelector: @selector(parser:foundCDATA:)]) |
︙ | |||
1002 1003 1004 1005 1006 1007 1008 | 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 | + - - + + | parser: self]; pool = objc_autoreleasePoolPush(); cache_append(cache, buffer + *last, encoding, *i - *last); comment = transform_string(cache, 2, NO, nil); if ([delegate respondsToSelector: @selector(parser:foundComment:)]) |
︙ | |||
1050 1051 1052 1053 1054 1055 1056 | 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 | - - + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + | { return finishedParsing; } - (OFString*)string: (OFString*)string containsUnknownEntityNamed: (OFString*)entity { |
Modified tests/OFXMLParserTests.m from [c34c13b545] to [0b180b31df].
︙ | |||
249 250 251 252 253 254 255 | 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 | - + - + | namespace: nil attributes: nil string: pi]; } - (void)parser: (OFXMLParser*)parser didStartElement: (OFString*)name |
︙ |