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

Side by Side Diff: Modules/posixmodule.c

Issue 16353: add function to os module for getting path to default shell
Patch Set: Created 3 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
« Lib/os.py ('K') | « Lib/os.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* POSIX module implementation */ 2 /* POSIX module implementation */
3 3
4 /* This file is also used for Windows NT/MS-Win. In that case the 4 /* This file is also used for Windows NT/MS-Win. In that case the
5 module actually calls itself 'nt', not 'posix', and a few 5 module actually calls itself 'nt', 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. '_MSC_VER'. */ 9 test macro, e.g. '_MSC_VER'. */
10 10
(...skipping 13228 matching lines...) Expand 10 before | Expand all | Expand 10 after
13239 return NULL; 13239 return NULL;
13240 for (trace = have_functions; *trace; trace++) { 13240 for (trace = have_functions; *trace; trace++) {
13241 PyObject *unicode = PyUnicode_DecodeASCII(*trace, strlen(*trace), NULL); 13241 PyObject *unicode = PyUnicode_DecodeASCII(*trace, strlen(*trace), NULL);
13242 if (!unicode) 13242 if (!unicode)
13243 return NULL; 13243 return NULL;
13244 if (PyList_Append(list, unicode)) 13244 if (PyList_Append(list, unicode))
13245 return NULL; 13245 return NULL;
13246 Py_DECREF(unicode); 13246 Py_DECREF(unicode);
13247 } 13247 }
13248 PyModule_AddObject(m, "_have_functions", list); 13248 PyModule_AddObject(m, "_have_functions", list);
13249
13250 #ifdef __ANDROID__
13251 v = Py_True;
13252 #else
13253 v = Py_False;
13254 #endif
13255 Py_INCREF(v);
13256 PyModule_AddObject(m, "is_android", v);
13249 13257
13250 initialized = 1; 13258 initialized = 1;
13251 13259
13252 return m; 13260 return m;
13253 } 13261 }
13254 13262
13255 #ifdef __cplusplus 13263 #ifdef __cplusplus
13256 } 13264 }
13257 #endif 13265 #endif
OLDNEW
« Lib/os.py ('K') | « Lib/os.py ('k') | no next file » | no next file with comments »

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