Differences From Artifact [433e48e1ac]:
- File src/OFTCPSocket.h — part of check-in [9e76144ef8] at 2015-06-13 22:26:05 on branch trunk — Add support for and use the new nullability (user: js, size: 7887) [annotate] [blame] [check-ins using]
To Artifact [5654a78b4e]:
- File
src/OFTCPSocket.h
— part of check-in
[b7097a67b6]
at
2015-06-14 10:45:10
on branch trunk
— Add OF_NONNULL / OF_NULLABLE and use that instead
Using __nonnull directly doesn't work on systems using glibc, as glibc
defines __nonnull as a parameterized define. While this does not fix the
problem of Clang introducing __nonnull even though it conflicts with
glibc, this at least means it's possible again to compile things with
versions of Clang that don't support __nonnull on systems with glibc. (user: js, size: 7890) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
30 31 32 33 34 35 36 | * @brief A block which is called when the socket connected. * * @param socket The socket which connected * @param exception An exception which occurred while connecting the socket or * nil on success */ typedef void (^of_tcp_socket_async_connect_block_t)(OFTCPSocket *socket, | | | | 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 | * @brief A block which is called when the socket connected. * * @param socket The socket which connected * @param exception An exception which occurred while connecting the socket or * nil on success */ typedef void (^of_tcp_socket_async_connect_block_t)(OFTCPSocket *socket, OFException *OF_NULLABLE exception); /*! * @brief A block which is called when the socket accepted a connection. * * @param socket The socket which accepted the connection * @param acceptedSocket The socket which has been accepted * @param exception An exception which occurred while accepting the socket or * nil on success * @return A bool whether the same block should be used for the next incoming * connection */ typedef bool (^of_tcp_socket_async_accept_block_t)(OFTCPSocket *socket, OFTCPSocket *acceptedSocket, OFException *OF_NULLABLE exception); #endif /*! * @class OFTCPSocket OFTCPSocket.h ObjFW/OFTCPSocket.h * * @brief A class which provides functions to create and use TCP sockets. * |
︙ | ︙ | |||
273 274 275 276 277 278 279 | */ - (bool)isTCPNoDelayEnabled; @end #ifdef __cplusplus extern "C" { #endif | | | 273 274 275 276 277 278 279 280 281 282 283 284 285 | */ - (bool)isTCPNoDelayEnabled; @end #ifdef __cplusplus extern "C" { #endif extern Class OF_NULLABLE of_tls_socket_class; #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END |