Index: src/OFDNSQuery.h ================================================================== --- src/OFDNSQuery.h +++ src/OFDNSQuery.h @@ -23,16 +23,16 @@ /** * @class OFDNSQuery OFDNSQuery.h ObjFW/OFDNSQuery.h * * @brief A class representing a DNS query. */ +OF_SUBCLASSING_RESTRICTED @interface OFDNSQuery: OFObject { OFString *_domainName; OFDNSClass _DNSClass; OFDNSRecordType _recordType; - OF_RESERVE_IVARS(OFDNSQuery, 4) } /** * @brief The domain name of the query. */ Index: src/OFDNSResponse.h ================================================================== --- src/OFDNSResponse.h +++ src/OFDNSResponse.h @@ -27,16 +27,16 @@ /** * @class OFDNSResponse OFDNSResponse.h ObjFW/OFDNSResponse.h * * @brief A class storing a response from @ref OFDNSResolver. */ +OF_SUBCLASSING_RESTRICTED @interface OFDNSResponse: OFObject { OFString *_domainName; OFDNSResponseRecords _answerRecords, _authorityRecords; OFDNSResponseRecords _additionalRecords; - OF_RESERVE_IVARS(OFDNSResponse, 4) } /** * @brief The domain name of the response. */ Index: src/OFHTTPClient.h ================================================================== --- src/OFHTTPClient.h +++ src/OFHTTPClient.h @@ -142,11 +142,11 @@ * @brief A class for performing HTTP requests. */ OF_SUBCLASSING_RESTRICTED @interface OFHTTPClient: OFObject { -#ifdef OF_HTTPCLIENT_M +#ifdef OF_HTTP_CLIENT_M @public #endif OFObject *_Nullable _delegate; bool _allowsInsecureRedirects, _inProgress; OFStream *_Nullable _stream; Index: src/OFHTTPClient.m ================================================================== --- src/OFHTTPClient.m +++ src/OFHTTPClient.m @@ -11,11 +11,11 @@ * 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. */ -#define OF_HTTPCLIENT_M +#define OF_HTTP_CLIENT_M #include "config.h" #include #include Index: src/OFHTTPCookie.h ================================================================== --- src/OFHTTPCookie.h +++ src/OFHTTPCookie.h @@ -27,17 +27,17 @@ /** * @class OFHTTPCookie OFHTTPCookie.h ObjFW/OFHTTPCookie.h * * @brief A class for storing and manipulating HTTP cookies. */ +OF_SUBCLASSING_RESTRICTED @interface OFHTTPCookie: OFObject { OFString *_name, *_value, *_domain, *_path; OFDate *_Nullable _expires; bool _secure, _HTTPOnly; OFMutableArray OF_GENERIC(OFString *) *_extensions; - OF_RESERVE_IVARS(OFHTTPCookie, 4) } /** * @brief The name of the cookie. */ Index: src/OFHTTPRequest.h ================================================================== --- src/OFHTTPRequest.h +++ src/OFHTTPRequest.h @@ -63,19 +63,19 @@ /** * @class OFHTTPRequest OFHTTPRequest.h ObjFW/OFHTTPRequest.h * * @brief A class for storing HTTP requests. */ +OF_SUBCLASSING_RESTRICTED @interface OFHTTPRequest: OFObject { OFURL *_URL; OFHTTPRequestMethod _method; OFHTTPRequestProtocolVersion _protocolVersion; OFDictionary OF_GENERIC(OFString *, OFString *) *_Nullable _headers; OFSocketAddress _remoteAddress; bool _hasRemoteAddress; - OF_RESERVE_IVARS(OFHTTPRequest, 4) } /** * @brief The URL of the HTTP request. */ Index: src/OFHTTPResponse.h ================================================================== --- src/OFHTTPResponse.h +++ src/OFHTTPResponse.h @@ -24,16 +24,18 @@ /** * @class OFHTTPResponse OFHTTPResponse.h ObjFW/OFHTTPResponse.h * * @brief A class for representing an HTTP request response as a stream. */ +#if !defined(OF_HTTP_CLIENT_M) && !defined(OF_HTTP_SERVER_M) +OF_SUBCLASSING_RESTRICTED +#endif @interface OFHTTPResponse: OFStream { OFHTTPRequestProtocolVersion _protocolVersion; short _statusCode; OFDictionary OF_GENERIC(OFString *, OFString *) *_headers; - OF_RESERVE_IVARS(OFHTTPResponse, 4) } /** * @brief The protocol version of the HTTP request response. */ Index: src/OFHTTPServer.m ================================================================== --- src/OFHTTPServer.m +++ src/OFHTTPServer.m @@ -10,10 +10,12 @@ * Alternatively, it may be distributed under the terms of the GNU General * 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. */ + +#define OF_HTTP_SERVER_M #include "config.h" #include #include Index: src/OFInvocation.h ================================================================== --- src/OFInvocation.h +++ src/OFInvocation.h @@ -24,16 +24,16 @@ /** * @class OFInvocation OFInvocation.h ObjFW/OFInvocation.h * * @brief A class for storing and accessing invocations, and invoking them. */ +OF_SUBCLASSING_RESTRICTED @interface OFInvocation: OFObject { OFMethodSignature *_methodSignature; OFMutableArray OF_GENERIC(OFMutableData *) *_arguments; OFMutableData *_returnValue; - OF_RESERVE_IVARS(OFInvocation, 4) } /** * @brief The method signature for the invocation. */ Index: src/OFMessagePackExtension.h ================================================================== --- src/OFMessagePackExtension.h +++ src/OFMessagePackExtension.h @@ -24,16 +24,16 @@ * @class OFMessagePackExtension \ * OFMessagePackExtension.h ObjFW/OFMessagePackExtension.h * * @brief A class for representing the MessagePack extension type. */ +OF_SUBCLASSING_RESTRICTED @interface OFMessagePackExtension: OFObject { int8_t _type; OFData *_data; - OF_RESERVE_IVARS(OFMessagePackExtension, 4) } /** * @brief The MessagePack extension type. */ Index: src/OFMethodSignature.h ================================================================== --- src/OFMethodSignature.h +++ src/OFMethodSignature.h @@ -22,15 +22,15 @@ /** * @class OFMethodSignature OFMethodSignature.h ObjFW/OFMethodSignature.h * * @brief A class for parsing type encodings and accessing them. */ +OF_SUBCLASSING_RESTRICTED @interface OFMethodSignature: OFObject { char *_types; OFMutableData *_typesPointers, *_offsets; - OF_RESERVE_IVARS(OFMethodSignature, 4) } /** * @brief The number of arguments of the method. */ Index: src/OFSPXStreamSocket.h ================================================================== --- src/OFSPXStreamSocket.h +++ src/OFSPXStreamSocket.h @@ -67,15 +67,12 @@ * use @ref OFSPXSocket instead. * * To connect to a server, create a socket and connect it. * To create a server, create a socket, bind it and listen on it. */ +OF_SUBCLASSING_RESTRICTED @interface OFSPXStreamSocket: OFStreamSocket -{ - OF_RESERVE_IVARS(OFSPXStreamSocket, 4) -} - /** * @brief The delegate for asynchronous operations on the socket. * * @note The delegate is retained for as long as asynchronous operations are * still ongoing. Index: src/OFSandbox.h ================================================================== --- src/OFSandbox.h +++ src/OFSandbox.h @@ -21,10 +21,11 @@ @class OFMutableArray OF_GENERIC(ObjectType); @class OFPair OF_GENERIC(FirstType, SecondType); typedef OFPair OF_GENERIC(OFString *, OFString *) *OFSandboxUnveilPath; +OF_SUBCLASSING_RESTRICTED @interface OFSandbox: OFObject { unsigned int _allowsStdIO: 1; unsigned int _allowsReadingFiles: 1; unsigned int _allowsWritingFiles: 1; @@ -56,11 +57,10 @@ unsigned int _allowsUnveil: 1; unsigned int _returnsErrors: 1; OFMutableArray OF_GENERIC(OFSandboxUnveilPath) *_unveiledPaths; @public size_t _unveiledPathsIndex; - OF_RESERVE_IVARS(OFSandbox, 4) } @property (nonatomic) bool allowsStdIO; @property (nonatomic) bool allowsReadingFiles; @property (nonatomic) bool allowsWritingFiles; Index: src/OFXMLAttribute.h ================================================================== --- src/OFXMLAttribute.h +++ src/OFXMLAttribute.h @@ -22,18 +22,18 @@ /** * @class OFXMLAttribute OFXMLAttribute.h ObjFW/OFXMLAttribute.h * * @brief A representation of an attribute of an XML element as an object. */ +OF_SUBCLASSING_RESTRICTED @interface OFXMLAttribute: OFXMLNode { #if defined(OF_XML_ELEMENT_M) || defined(OF_XML_PARSER_M) @public #endif OFString *_name, *_Nullable _namespace, *_stringValue; bool _useDoubleQuotes; - OF_RESERVE_IVARS(OFXMLAttribute, 4) } /** * @brief The name of the attribute. */ Index: src/OFXMLCDATA.h ================================================================== --- src/OFXMLCDATA.h +++ src/OFXMLCDATA.h @@ -20,14 +20,14 @@ /** * @class OFXMLCDATA OFXMLCDATA.h ObjFW/OFXMLCDATA.h * * @brief A class representing XML CDATA. */ +OF_SUBCLASSING_RESTRICTED @interface OFXMLCDATA: OFXMLNode { OFString *_CDATA; - OF_RESERVE_IVARS(OFXMLCDATA, 4) } /** * @brief Creates a new OFXMLCDATA with the specified string. * Index: src/OFXMLCharacters.h ================================================================== --- src/OFXMLCharacters.h +++ src/OFXMLCharacters.h @@ -20,14 +20,14 @@ /** * @class OFXMLCharacters OFXMLCharacters.h ObjFW/OFXMLCharacters.h * * @brief A class representing XML characters. */ +OF_SUBCLASSING_RESTRICTED @interface OFXMLCharacters: OFXMLNode { OFString *_characters; - OF_RESERVE_IVARS(OFXMLCharacters, 4) } /** * @brief Creates a new OFXMLCharacters with the specified string. * Index: src/OFXMLComment.h ================================================================== --- src/OFXMLComment.h +++ src/OFXMLComment.h @@ -20,14 +20,14 @@ /** * @class OFXMLComment OFXMLComment.h ObjFW/OFXMLComment.h * * @brief A class for representing XML comments. */ +OF_SUBCLASSING_RESTRICTED @interface OFXMLComment: OFXMLNode { OFString *_text; - OF_RESERVE_IVARS(OFXMLComment, 4) } /** * @brief The comment text. */ Index: src/OFXMLElementBuilder.h ================================================================== --- src/OFXMLElementBuilder.h +++ src/OFXMLElementBuilder.h @@ -100,15 +100,15 @@ * * It can also be used to build OFXMLElements from parts of the document by * first parsing stuff using the OFXMLParser with another delegate and then * setting the OFXMLElementBuilder as delegate for the parser. */ +OF_SUBCLASSING_RESTRICTED @interface OFXMLElementBuilder: OFObject { OFMutableArray OF_GENERIC(OFXMLElement *) *_stack; id _Nullable _delegate; - OF_RESERVE_IVARS(OFXMLElementBuilder, 4) } /** * @brief The delegate for the OFXMLElementBuilder. */ Index: src/OFXMLProcessingInstruction.h ================================================================== --- src/OFXMLProcessingInstruction.h +++ src/OFXMLProcessingInstruction.h @@ -21,14 +21,14 @@ * @class OFXMLProcessingInstruction \ * OFXMLProcessingInstruction.h ObjFW/OFXMLProcessingInstruction.h * * @brief A class for representing an XML processing instruction. */ +OF_SUBCLASSING_RESTRICTED @interface OFXMLProcessingInstruction: OFXMLNode { OFString *_target, *_Nullable _text; - OF_RESERVE_IVARS(OFXMLProcessingInstruction, 4) } /** * @brief The target of the processing instruction. */