Artifact d9f2f102aaaef2c51a987e72a211d41de35982eb7b7a4017a693e5d240aad999:
- File
src/OFConstString.h
— part of check-in
[cbdd534337]
at
2009-04-12 14:51:00
on branch trunk
— Get rid of the dependency on Object.
This allows libobjfw to run on ObjC2-only runtimes like the one on the
iPhone. However, it's still relying on objc_msgSendv for plugins, which
is unavailable in ObjC2-only runtimes, thus OFPlugins are unavailable
on the iPhone until I write a replacement for objc_msgSendv. (user: js, size: 913) [annotate] [blame] [check-ins using]
/* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFObject.h" #ifndef __objc_INCLUDE_GNU #import <objc/runtime.h> extern void *_OFConstStringClassReference; #endif /** * A class for storing static strings using the @"" literal. */ @interface OFConstString: OFObject { char *string; size_t length; } /** * \return The OFString as a C string */ - (const char*)cString; /** * \return The length of the OFString */ - (size_t)length; /** * Compares the OFString to another object. * * \param obj An object to compare with * \return An integer which is the result of the comparison, see for example * strcmp */ - (int)compare: (id)obj; @end