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

Side by Side Diff: Python/bltinmodule.c

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pyconfig.h.in ('k') | Python/ceval.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Built-in functions */ 1 /* Built-in functions */
2 2
3 #include "Python.h" 3 #include "Python.h"
4 #include "Python-ast.h" 4 #include "Python-ast.h"
5 5
6 #include "node.h" 6 #include "node.h"
7 #include "code.h" 7 #include "code.h"
8 8
9 #include <ctype.h> 9 #include <ctype.h>
10 10
11 #ifdef HAVE_LANGINFO_H 11 #ifdef HAVE_LANGINFO_H
12 #include <langinfo.h> /* CODESET */ 12 #include <langinfo.h> /* CODESET */
13 #endif 13 #endif
14 14
15 /* The default encoding used by the platform file system APIs 15 /* The default encoding used by the platform file system APIs
16 Can remain NULL for all platforms that don't have such a concept 16 Can remain NULL for all platforms that don't have such a concept
17 17
18 Don't forget to modify PyUnicode_DecodeFSDefault() if you touch any of the 18 Don't forget to modify PyUnicode_DecodeFSDefault() if you touch any of the
19 values for Py_FileSystemDefaultEncoding! 19 values for Py_FileSystemDefaultEncoding!
20 */ 20 */
21 #ifdef HAVE_MBCS 21 #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
22 const char *Py_FileSystemDefaultEncoding = "mbcs"; 22 const char *Py_FileSystemDefaultEncoding = "mbcs";
23 int Py_HasFileSystemDefaultEncoding = 1; 23 int Py_HasFileSystemDefaultEncoding = 1;
24 #elif defined(__APPLE__) 24 #elif defined(__APPLE__)
25 const char *Py_FileSystemDefaultEncoding = "utf-8"; 25 const char *Py_FileSystemDefaultEncoding = "utf-8";
26 int Py_HasFileSystemDefaultEncoding = 1; 26 int Py_HasFileSystemDefaultEncoding = 1;
27 #else 27 #elif defined(HAVE_LANGINFO_H) && defined(CODESET)
28 const char *Py_FileSystemDefaultEncoding = NULL; /* set by initfsencoding() */ 28 const char *Py_FileSystemDefaultEncoding = NULL; /* set by initfsencoding() */
29 int Py_HasFileSystemDefaultEncoding = 0; 29 int Py_HasFileSystemDefaultEncoding = 0;
30 #else
31 const char *Py_FileSystemDefaultEncoding = "utf-8";
32 int Py_HasFileSystemDefaultEncoding = 1;
30 #endif 33 #endif
31 34
32 static PyObject * 35 static PyObject *
33 builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds) 36 builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
34 { 37 {
35 PyObject *func, *name, *bases, *mkw, *meta, *prep, *ns, *cell; 38 PyObject *func, *name, *bases, *mkw, *meta, *prep, *ns, *cell;
36 PyObject *cls = NULL; 39 PyObject *cls = NULL;
37 Py_ssize_t nargs; 40 Py_ssize_t nargs;
38 41
39 assert(args != NULL); 42 assert(args != NULL);
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2374 if (PyDict_SetItemString(dict, "__debug__", debug) < 0) { 2377 if (PyDict_SetItemString(dict, "__debug__", debug) < 0) {
2375 Py_XDECREF(debug); 2378 Py_XDECREF(debug);
2376 return NULL; 2379 return NULL;
2377 } 2380 }
2378 Py_XDECREF(debug); 2381 Py_XDECREF(debug);
2379 2382
2380 return mod; 2383 return mod;
2381 #undef ADD_TO_ALL 2384 #undef ADD_TO_ALL
2382 #undef SETBUILTIN 2385 #undef SETBUILTIN
2383 } 2386 }
OLDNEW
« no previous file with comments | « pyconfig.h.in ('k') | Python/ceval.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+