ObjFW  Artifact [afd472834a]

Artifact afd472834ad4cc1b9c6a3c0c59afd3e2bea054ee104afcb85d52f9ba05297743:

  • File src/OFConstantString.h — part of check-in [5171307598] at 2013-07-15 00:10:31 on branch trunk — OFConstantString: _cStringLength -> unsigned int.

    This field is actually only an unsigned int and not a size_t.

    It never caused trouble on 64-bit little endian machines as padding was
    added and so the most significant 32 bits were just 0. However, on 64-bit
    big endian machines like SPARC64, the most significant 32 bit come
    first, and thus the 32 bit size would treated as the 32 bit most
    significant bits of a 64 bit value.

    This also adds OpenBSD 5.3/SPARC64 to PLATFORMS.md. (user: js, size: 972) [annotate] [blame] [check-ins using]


/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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 "OFString.h"

#if !defined(OF_CONSTANT_STRING_M) && \
    defined(OF_APPLE_RUNTIME) && !defined(__OBJC2__)
# ifdef __cplusplus
extern "C" {
# endif
extern void *_OFConstantStringClassReference;
# ifdef __cplusplus
}
# endif
#endif

/*!
 * @brief A class for storing constant strings using the \@"" literal.
 */
@interface OFConstantString: OFString
{
	char *_cString;
	unsigned int _cStringLength;
}
@end