mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	New function sys.getcheckinterval(), to complement setcheckinterval().
This commit is contained in:
		
							parent
							
								
									d6640d4bd0
								
							
						
					
					
						commit
						e5e065b669
					
				
					 4 changed files with 24 additions and 2 deletions
				
			
		|  | @ -431,6 +431,16 @@ Tell the Python interpreter to check for asynchronous events every\n\ | |||
| n instructions.  This also affects how often thread switches occur." | ||||
| ); | ||||
| 
 | ||||
| static PyObject * | ||||
| sys_getcheckinterval(PyObject *self, PyObject *args) | ||||
| { | ||||
| 	return PyInt_FromLong(_Py_CheckInterval); | ||||
| } | ||||
| 
 | ||||
| PyDoc_STRVAR(getcheckinterval_doc, | ||||
| "getcheckinterval() -> current check interval; see setcheckinterval()." | ||||
| ); | ||||
| 
 | ||||
| static PyObject * | ||||
| sys_setrecursionlimit(PyObject *self, PyObject *args) | ||||
| { | ||||
|  | @ -723,6 +733,8 @@ static PyMethodDef sys_methods[] = { | |||
| #endif | ||||
| 	{"setcheckinterval",	sys_setcheckinterval, METH_VARARGS, | ||||
| 	 setcheckinterval_doc},  | ||||
| 	{"getcheckinterval",	sys_getcheckinterval, METH_NOARGS, | ||||
| 	 getcheckinterval_doc},  | ||||
| #ifdef HAVE_DLOPEN | ||||
| 	{"setdlopenflags", sys_setdlopenflags, METH_VARARGS,  | ||||
| 	 setdlopenflags_doc}, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Peters
						Tim Peters