comparison Python/sysmodule.c @ 45026:ebfbaa1051e2

Merged revisions 60364-60378 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60364 | neal.norwitz | 2008-01-27 19:09:48 +0100 (Sun, 27 Jan 2008) | 4 lines Update the comment and remove the close. If we close we can't flush anymore. We might still need to close after the for loop if flushing 6! times still doesn't cause the signal/exception. ........ r60365 | georg.brandl | 2008-01-27 19:14:43 +0100 (Sun, 27 Jan 2008) | 2 lines Remove effectless expression statement. ........ r60367 | neal.norwitz | 2008-01-27 19:19:04 +0100 (Sun, 27 Jan 2008) | 1 line Try to handle socket.errors properly in is_unavailable ........ r60370 | christian.heimes | 2008-01-27 20:01:45 +0100 (Sun, 27 Jan 2008) | 1 line Change isbasestring function as discussed on the cvs list a while ago ........ r60372 | neal.norwitz | 2008-01-27 21:03:13 +0100 (Sun, 27 Jan 2008) | 3 lines socket.error doesn't have a headers attribute like ProtocolError. Handle that situation where we catch socket.errors. ........ r60375 | georg.brandl | 2008-01-27 21:25:12 +0100 (Sun, 27 Jan 2008) | 2 lines Add refcounting extension to build config. ........ r60377 | jeffrey.yasskin | 2008-01-28 00:08:46 +0100 (Mon, 28 Jan 2008) | 6 lines Moved Rational._binary_float_to_ratio() to float.as_integer_ratio() because it's useful outside of rational numbers. This is my first C code that had to do anything significant. Please be more careful when looking over it. ........ r60378 | christian.heimes | 2008-01-28 00:34:59 +0100 (Mon, 28 Jan 2008) | 1 line Added clear cache methods to clear the internal type lookup cache for ref leak test runs. ........
author Christian Heimes <christian@cheimes.de>
date Sun, 27 Jan 2008 23:50:43 +0000
parents ef7d72d98485
children f380d991390e
comparison
equal deleted inserted replaced
45023:727cc810d690 45026:ebfbaa1051e2
728 8. generator calls\n\ 728 8. generator calls\n\
729 9. All other calls\n\ 729 9. All other calls\n\
730 10. Number of stack pops performed by call_function()" 730 10. Number of stack pops performed by call_function()"
731 ); 731 );
732 732
733 static PyObject *
734 sys_cleartypecache(PyObject* self, PyObject* args)
735 {
736 PyType_ClearCache();
737 Py_RETURN_NONE;
738 }
739
740 PyDoc_STRVAR(cleartypecache_doc,
741 "_cleartypecache() -> None\n\
742 Clear the internal type lookup cache.");
743
733 #ifdef __cplusplus 744 #ifdef __cplusplus
734 extern "C" { 745 extern "C" {
735 #endif 746 #endif
736 747
737 #ifdef Py_TRACE_REFS 748 #ifdef Py_TRACE_REFS
750 761
751 static PyMethodDef sys_methods[] = { 762 static PyMethodDef sys_methods[] = {
752 /* Might as well keep this in alphabetic order */ 763 /* Might as well keep this in alphabetic order */
753 {"callstats", (PyCFunction)PyEval_GetCallStats, METH_NOARGS, 764 {"callstats", (PyCFunction)PyEval_GetCallStats, METH_NOARGS,
754 callstats_doc}, 765 callstats_doc},
766 {"_cleartypecache", sys_cleartypecache, METH_NOARGS,
767 cleartypecache_doc},
755 {"_current_frames", sys_current_frames, METH_NOARGS, 768 {"_current_frames", sys_current_frames, METH_NOARGS,
756 current_frames_doc}, 769 current_frames_doc},
757 {"displayhook", sys_displayhook, METH_O, displayhook_doc}, 770 {"displayhook", sys_displayhook, METH_O, displayhook_doc},
758 {"exc_info", sys_exc_info, METH_NOARGS, exc_info_doc}, 771 {"exc_info", sys_exc_info, METH_NOARGS, exc_info_doc},
759 {"excepthook", sys_excepthook, METH_VARARGS, excepthook_doc}, 772 {"excepthook", sys_excepthook, METH_VARARGS, excepthook_doc},