From a0d7a233981ce56c74d3fd6a4fb0cadac08a7654 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 9 Jan 1995 17:46:13 +0000 Subject: [PATCH] sys.check_interval=x -> sys.setcheckinterval(x) --- Include/sysmodule.h | 1 + Python/sysmodule.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Include/sysmodule.h b/Include/sysmodule.h index 46d0070d66e..1f1589af580 100644 --- a/Include/sysmodule.h +++ b/Include/sysmodule.h @@ -36,6 +36,7 @@ FILE *sysgetfile PROTO((char *, FILE *)); void initsys PROTO((void)); extern DL_IMPORT object *sys_trace, *sys_profile; +extern DL_IMPORT int sys_checkinterval; #ifdef __cplusplus } diff --git a/Python/sysmodule.c b/Python/sysmodule.c index ea673639158..5d7955bf3bf 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -45,6 +45,7 @@ Data members: #include "osdefs.h" object *sys_trace, *sys_profile; +int sys_checkinterval; static object *sysdict; @@ -124,6 +125,17 @@ sys_setprofile(self, args) return None; } +static object * +sys_setcheckinterval(self, args) + object *self; + object *args; +{ + if (!newgetargs(args, "i", &sys_checkinterval)) + return NULL; + INCREF(None); + return None; +} + #ifdef USE_MALLOPT /* Link with -lmalloc (or -lmpc) on an SGI */ #include @@ -149,6 +161,7 @@ static struct methodlist sys_methods[] = { #endif {"setprofile", sys_setprofile}, {"settrace", sys_settrace}, + {"setcheckinterval", sys_setcheckinterval}, {NULL, NULL} /* sentinel */ };