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

Side by Side Diff: Python/sysmodule.c

Issue 13704: Random number generator in Python core
Patch Set: Created 8 years 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
« Python/random.c ('K') | « Python/random.c ('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 /* System module */ 2 /* System module */
3 3
4 /* 4 /*
5 Various bits of information used by the interpreter are collected in 5 Various bits of information used by the interpreter are collected in
6 module 'sys'. 6 module 'sys'.
7 Function member: 7 Function member:
8 - exit(sts): raise SystemExit 8 - exit(sts): raise SystemExit
9 Data members: 9 Data members:
10 - stdin, stdout, stderr: standard file objects 10 - stdin, stdout, stderr: standard file objects
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 {"no_site", "-S"}, 1325 {"no_site", "-S"},
1326 {"ignore_environment", "-E"}, 1326 {"ignore_environment", "-E"},
1327 {"verbose", "-v"}, 1327 {"verbose", "-v"},
1328 #ifdef RISCOS 1328 #ifdef RISCOS
1329 {"riscos_wimp", "???"}, 1329 {"riscos_wimp", "???"},
1330 #endif 1330 #endif
1331 /* {"unbuffered", "-u"}, */ 1331 /* {"unbuffered", "-u"}, */
1332 /* {"skip_first", "-x"}, */ 1332 /* {"skip_first", "-x"}, */
1333 {"bytes_warning", "-b"}, 1333 {"bytes_warning", "-b"},
1334 {"quiet", "-q"}, 1334 {"quiet", "-q"},
1335 {"no_random_hash", "-r"},
1335 {0} 1336 {0}
1336 }; 1337 };
1337 1338
1338 static PyStructSequence_Desc flags_desc = { 1339 static PyStructSequence_Desc flags_desc = {
1339 "sys.flags", /* name */ 1340 "sys.flags", /* name */
1340 flags__doc__, /* doc */ 1341 flags__doc__, /* doc */
1341 flags_fields, /* fields */ 1342 flags_fields, /* fields */
1342 #ifdef RISCOS 1343 #ifdef RISCOS
1344 13
1345 #else
1343 12 1346 12
1344 #else
1345 11
1346 #endif 1347 #endif
1347 }; 1348 };
1348 1349
1349 static PyObject* 1350 static PyObject*
1350 make_flags(void) 1351 make_flags(void)
1351 { 1352 {
1352 int pos = 0; 1353 int pos = 0;
1353 PyObject *seq; 1354 PyObject *seq;
1354 1355
1355 seq = PyStructSequence_New(&FlagsType); 1356 seq = PyStructSequence_New(&FlagsType);
(...skipping 12 matching lines...) Expand all
1368 SetFlag(Py_NoSiteFlag); 1369 SetFlag(Py_NoSiteFlag);
1369 SetFlag(Py_IgnoreEnvironmentFlag); 1370 SetFlag(Py_IgnoreEnvironmentFlag);
1370 SetFlag(Py_VerboseFlag); 1371 SetFlag(Py_VerboseFlag);
1371 #ifdef RISCOS 1372 #ifdef RISCOS
1372 SetFlag(Py_RISCOSWimpFlag); 1373 SetFlag(Py_RISCOSWimpFlag);
1373 #endif 1374 #endif
1374 /* SetFlag(saw_unbuffered_flag); */ 1375 /* SetFlag(saw_unbuffered_flag); */
1375 /* SetFlag(skipfirstline); */ 1376 /* SetFlag(skipfirstline); */
1376 SetFlag(Py_BytesWarningFlag); 1377 SetFlag(Py_BytesWarningFlag);
1377 SetFlag(Py_QuietFlag); 1378 SetFlag(Py_QuietFlag);
1379 SetFlag(Py_NoRandomHashFlag);
1378 #undef SetFlag 1380 #undef SetFlag
1379 1381
1380 if (PyErr_Occurred()) { 1382 if (PyErr_Occurred()) {
1381 return NULL; 1383 return NULL;
1382 } 1384 }
1383 return seq; 1385 return seq;
1384 } 1386 }
1385 1387
1386 PyDoc_STRVAR(version_info__doc__, 1388 PyDoc_STRVAR(version_info__doc__,
1387 "sys.version_info\n\ 1389 "sys.version_info\n\
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 1997
1996 void 1998 void
1997 PySys_FormatStderr(const char *format, ...) 1999 PySys_FormatStderr(const char *format, ...)
1998 { 2000 {
1999 va_list va; 2001 va_list va;
2000 2002
2001 va_start(va, format); 2003 va_start(va, format);
2002 sys_format("stderr", stderr, format, va); 2004 sys_format("stderr", stderr, format, va);
2003 va_end(va); 2005 va_end(va);
2004 } 2006 }
OLDNEW
« Python/random.c ('K') | « Python/random.c ('k') | no next file » | no next file with comments »

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