Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(23)

Delta Between Two Patch Sets: Modules/posixmodule.c

Issue 3055: combined patches from http://bugs.python.org/issue3187 (Closed) SVN Base: http://svn.python.org/view/*checkout*/python/branches/py3k/
Left Patch Set: Victor's latest patch (Sept 29 '08) Created 1 year, 1 month ago , Downloaded from: http://bugs.python.org/file11658/python3_bytes_filename.patch
Right Patch Set: One more tweak (fold some long lines) Created 1 year, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 1
2 /* POSIX module implementation */ 2 /* POSIX module implementation */
3 3
4 /* This file is also used for Windows NT/MS-Win and OS/2. In that case the 4 /* This file is also used for Windows NT/MS-Win and OS/2. In that case the
5 module actually calls itself 'nt' or 'os2', not 'posix', and a few 5 module actually calls itself 'nt' or 'os2', not 'posix', and a few
6 functions are either unimplemented or implemented differently. The source 6 functions are either unimplemented or implemented differently. The source
7 assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent 7 assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent
8 of the compiler used. Different compilers define their own feature 8 of the compiler used. Different compilers define their own feature
9 test macro, e.g. '__BORLANDC__' or '_MSC_VER'. For OS/2, the compiler 9 test macro, e.g. '__BORLANDC__' or '_MSC_VER'. For OS/2, the compiler
10 independent macro PYOS_OS2 should be defined. On OS/2 the default 10 independent macro PYOS_OS2 should be defined. On OS/2 the default
(...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2347 if (arg_is_unicode) { 2347 if (arg_is_unicode) {
2348 PyObject *w; 2348 PyObject *w;
2349 2349
2350 w = PyUnicode_FromEncodedObject(v, 2350 w = PyUnicode_FromEncodedObject(v,
2351 Py_FileSystemDefaultEncoding, 2351 Py_FileSystemDefaultEncoding,
2352 "strict"); 2352 "strict");
2353 if (w != NULL) { 2353 if (w != NULL) {
2354 Py_DECREF(v); 2354 Py_DECREF(v);
2355 v = w; 2355 v = w;
2356 } 2356 }
2357 else { 2357 else {
GvR 2008/09/30 18:10:41 I'd like to see a comment here, e.g. /* Ignore un
2358 /* Ignore undecodable filenames, as discussed
2359 * in issue 3187. To include these,
2360 * use getcwdb(). */
2358 PyErr_Clear(); 2361 PyErr_Clear();
2359 Py_DECREF(v); 2362 Py_DECREF(v);
2360 continue; 2363 continue;
2361 } 2364 }
2362 } 2365 }
2363 if (PyList_Append(d, v) != 0) { 2366 if (PyList_Append(d, v) != 0) {
2364 Py_DECREF(v); 2367 Py_DECREF(v);
2365 Py_DECREF(d); 2368 Py_DECREF(d);
2366 d = NULL; 2369 d = NULL;
2367 break; 2370 break;
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
4447 PyObject *w; 4450 PyObject *w;
4448 4451
4449 w = PyUnicode_FromEncodedObject(v, 4452 w = PyUnicode_FromEncodedObject(v,
4450 Py_FileSystemDefaultEncoding, 4453 Py_FileSystemDefaultEncoding,
4451 "strict"); 4454 "strict");
4452 if (w != NULL) { 4455 if (w != NULL) {
4453 Py_DECREF(v); 4456 Py_DECREF(v);
4454 v = w; 4457 v = w;
4455 } 4458 }
4456 else { 4459 else {
4457 » » » /* fall back to the original byte string, as 4460 » » » v = NULL;
4458 » » » discussed in patch #683592 */
4459 » » » PyErr_Clear();
4460 } 4461 }
4461 } 4462 }
4462 return v; 4463 return v;
4463 } 4464 }
4464 #endif /* HAVE_READLINK */ 4465 #endif /* HAVE_READLINK */
4465 4466
4466 4467
4467 #ifdef HAVE_SYMLINK 4468 #ifdef HAVE_SYMLINK
4468 PyDoc_STRVAR(posix_symlink__doc__, 4469 PyDoc_STRVAR(posix_symlink__doc__,
4469 "symlink(src, dst)\n\n\ 4470 "symlink(src, dst)\n\n\
(...skipping 2968 matching lines...) Expand 10 before | Expand all | Expand 10 after
7438 7439
7439 7440
7440 #endif /* __APPLE__ */ 7441 #endif /* __APPLE__ */
7441 return m; 7442 return m;
7442 7443
7443 } 7444 }
7444 7445
7445 #ifdef __cplusplus 7446 #ifdef __cplusplus
7446 } 7447 }
7447 #endif 7448 #endif
LEFTRIGHT
« Misc/NEWS ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r483