Index: src/OFHTTPRequest.h ================================================================== --- src/OFHTTPRequest.h +++ src/OFHTTPRequest.h @@ -51,11 +51,11 @@ /** * @struct OFHTTPRequestProtocolVersion OFHTTPRequest.h ObjFW/OFHTTPRequest.h * * @brief The HTTP version of the HTTP request. */ -typedef struct OF_BOXABLE { +typedef struct OF_BOXABLE OFHTTPRequestProtocolVersion { /** The major of the HTTP version */ unsigned char major; /** The minor of the HTTP version */ unsigned char minor; } OFHTTPRequestProtocolVersion; Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -101,11 +101,11 @@ /** * @struct OFRange OFObject.h ObjFW/OFObject.h * * @brief A range. */ -typedef struct OF_BOXABLE { +typedef struct OF_BOXABLE OFRange { /** The start of the range */ size_t location; /** The length of the range */ size_t length; } OFRange; @@ -152,11 +152,11 @@ /** * @struct OFPoint OFObject.h ObjFW/OFObject.h * * @brief A point in 2D space. */ -typedef struct OF_BOXABLE { +typedef struct OF_BOXABLE OFPoint { /** The x coordinate of the point */ float x; /** The y coordinate of the point */ float y; } OFPoint; @@ -198,11 +198,11 @@ /** * @struct OFSize OFObject.h ObjFW/OFObject.h * * @brief A size. */ -typedef struct OF_BOXABLE { +typedef struct OF_BOXABLE OFSize { /** The width of the size */ float width; /** The height of the size */ float height; } OFSize; @@ -244,11 +244,11 @@ /** * @struct OFRect OFObject.h ObjFW/OFObject.h * * @brief A rectangle. */ -typedef struct OF_BOXABLE { +typedef struct OF_BOXABLE OFRect { /** The point from where the rectangle originates */ OFPoint origin; /** The size of the rectangle */ OFSize size; } OFRect; @@ -295,11 +295,11 @@ /** * @struct OFVector3D OFObject.h ObjFW/OFObject.h * * @brief A vector in 3D space. */ -typedef struct OF_BOXABLE { +typedef struct OF_BOXABLE OFVector3D { /** The x coordinate of the vector */ float x; /** The y coordinate of the vector */ float y; /** The z coordinate of the vector */ @@ -347,11 +347,11 @@ /** * @struct OFVector4D OFObject.h ObjFW/OFObject.h * * @brief A vector in 4D space. */ -typedef struct OF_BOXABLE { +typedef struct OF_BOXABLE OFVector4D { /** The x coordinate of the vector */ float x; /** The y coordinate of the vector */ float y; /** The z coordinate of the vector */ Index: src/OFSocket.h ================================================================== --- src/OFSocket.h +++ src/OFSocket.h @@ -177,11 +177,11 @@ /** * @struct OFSocketAddress OFSocket.h ObjFW/OFSocket.h * * @brief A struct which represents a host / port pair for a socket. */ -typedef struct OF_BOXABLE { +typedef struct OF_BOXABLE OFSocketAddress { OFSocketAddressFamily family; /* * We can't use struct sockaddr as it can contain variable length * arrays. */ Index: src/OFValue.m ================================================================== --- src/OFValue.m +++ src/OFValue.m @@ -250,15 +250,48 @@ return ret; } - (OFString *)description { - OFMutableString *ret = - [OFMutableString stringWithString: @"", + rangeValue.location, rangeValue.length]; + } else if (strcmp(objCType, @encode(OFPoint)) == 0 || + strcmp(objCType, @encode(const OFPoint)) == 0) { + OFPoint pointValue; + [self getValue: &pointValue size: sizeof(pointValue)]; + return [OFString stringWithFormat: + @"", + pointValue.x, pointValue.y]; + } else if (strcmp(objCType, @encode(OFSize)) == 0 || + strcmp(objCType, @encode(const OFSize)) == 0) { + OFSize sizeValue; + [self getValue: &sizeValue size: sizeof(sizeValue)]; + return [OFString stringWithFormat: + @"", + sizeValue.width, sizeValue.height]; + } else if (strcmp(objCType, @encode(OFRect)) == 0 || + strcmp(objCType, @encode(const OFRect)) == 0) { + OFRect rectValue; + [self getValue: &rectValue size: sizeof(rectValue)]; + return [OFString stringWithFormat: + @"", + rectValue.origin.x, rectValue.origin.y, + rectValue.size.width, rectValue.size.height]; + } + + ret = [OFMutableString stringWithString: @"