Artifact c032ad54fa86b5e4ad0c27136533dcc99d75d0bd2c0630273c1119f6a5201884:
- File
src/OFMessagePackExtension.h
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 1916) [annotate] [blame] [check-ins using]
/* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 * Jonathan Schleifer <js@heap.zone> * * 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.QPL included in * the packaging of this file. * * 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. */ #import "OFObject.h" #import "OFMessagePackRepresentation.h" OF_ASSUME_NONNULL_BEGIN @class OFData; /*! * @class OFMessagePackExtension \ * OFMessagePackExtension.h ObjFW/OFMessagePackExtension.h * * @brief A class for representing the MessagePack extension type. */ @interface OFMessagePackExtension: OFObject <OFMessagePackRepresentation, OFCopying> { int8_t _type; OFData *_data; } /*! * The MessagePack extension type. */ @property (readonly, nonatomic) int8_t type; /*! * @return The data of the extension. */ @property (readonly, nonatomic) OFData *data; /*! * @brief Creates a new OFMessagePackRepresentation with the specified type and * data. * * @param type The MessagePack extension type * @param data The data for the extension * @return A new, autoreleased OFMessagePackRepresentation */ + (instancetype)extensionWithType: (int8_t)type data: (OFData *)data; - (instancetype)init OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFMessagePackRepresentation with the * specified type and data. * * @param type The MessagePack extension type * @param data The data for the extension * @return An initialized OFMessagePackRepresentation */ - (instancetype)initWithType: (int8_t)type data: (OFData *)data OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END