Differences From Artifact [d3f94ba1f6]:
- File src/OFString.m — part of check-in [176e97bd4d] at 2021-08-07 23:25:13 on branch trunk — Make Apple GCC 4.0.1 happy again (user: js, size: 66431) [annotate] [blame] [check-ins using] [more...]
To Artifact [0292b59c78]:
- File
src/OFString.m
— part of check-in
[1483709ab2]
at
2022-08-01 21:20:54
on branch trunk
— Add support for embedding files into binaries
Embedded files are available via the objfw-embedded: URL scheme. (user: js, size: 66556) [annotate] [blame] [check-ins using] [more...]
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2008-2022 Jonathan Schleifer <js@nil.im> * * 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. * |
︙ | ︙ | |||
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 | @try { data = [OFData dataWithContentsOfURL: URL]; } @catch (id e) { [self release]; @throw e; } self = [self initWithCString: data.items encoding: encoding length: data.count * data.itemSize]; objc_autoreleasePoolPop(pool); | > > > > | 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 | @try { data = [OFData dataWithContentsOfURL: URL]; } @catch (id e) { [self release]; @throw e; } /* FIXME: Detect encoding where we can. */ if (encoding == OFStringEncodingAutodetect) encoding = OFStringEncodingUTF8; self = [self initWithCString: data.items encoding: encoding length: data.count * data.itemSize]; objc_autoreleasePoolPop(pool); |
︙ | ︙ |