Differences From Artifact [ce308c71b7]:
- File
src/OFApplication.m
— part of check-in
[e54c8c0368]
at
2014-01-16 23:38:42
on branch trunk
— Add +[OFString nativeOSEncoding].
This replaces OF_STRING_ENCODING_NATIVE, as a define was not flexible
enough (determining the native OS encoding at startup was not possible). (user: js, size: 9947) [annotate] [blame] [check-ins using]
To Artifact [bad1c6eacd]:
- File src/OFApplication.m — part of check-in [f82406c3fd] at 2014-02-12 03:17:12 on branch trunk — Call FreeEnvironmentStringsW on correct pointer (user: js, size: 9962) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
169 170 171 172 173 174 175 | @try { void *pool; OFMutableDictionary *environment; #if defined(__MACH__) && !defined(OF_IOS) char **env = *_NSGetEnviron(); #elif defined(__WIN32) | | | | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | @try { void *pool; OFMutableDictionary *environment; #if defined(__MACH__) && !defined(OF_IOS) char **env = *_NSGetEnviron(); #elif defined(__WIN32) of_char16_t *env, *env0; #elif !defined(OF_IOS) char **env = environ; #else char *env; #endif environment = [[OFMutableDictionary alloc] init]; atexit(atexitHandler); #if defined(_WIN32) env = env0 = GetEnvironmentStringsW(); while (*env != 0) { OFString *tmp, *key, *value; size_t length, pos; pool = objc_autoreleasePoolPush(); |
︙ | ︙ | |||
220 221 222 223 224 225 226 | [environment setObject: value forKey: key]; objc_autoreleasePoolPop(pool); } | | | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | [environment setObject: value forKey: key]; objc_autoreleasePoolPop(pool); } FreeEnvironmentStringsW(env0); #elif !defined(OF_IOS) if (env != NULL) { for (; *env != NULL; env++) { OFString *key, *value; char *sep; const of_string_encoding_t encoding = [OFString nativeOSEncoding]; |
︙ | ︙ |