Skip to content

Commit a0d7a23

Browse files
committed
sys.check_interval=x -> sys.setcheckinterval(x)
1 parent e791c2e commit a0d7a23

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Include/sysmodule.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ FILE *sysgetfile PROTO((char *, FILE *));
3636
void initsys PROTO((void));
3737

3838
extern DL_IMPORT object *sys_trace, *sys_profile;
39+
extern DL_IMPORT int sys_checkinterval;
3940

4041
#ifdef __cplusplus
4142
}

Python/sysmodule.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Data members:
4545
#include "osdefs.h"
4646

4747
object *sys_trace, *sys_profile;
48+
int sys_checkinterval;
4849

4950
static object *sysdict;
5051

@@ -124,6 +125,17 @@ sys_setprofile(self, args)
124125
return None;
125126
}
126127

128+
static object *
129+
sys_setcheckinterval(self, args)
130+
object *self;
131+
object *args;
132+
{
133+
if (!newgetargs(args, "i", &sys_checkinterval))
134+
return NULL;
135+
INCREF(None);
136+
return None;
137+
}
138+
127139
#ifdef USE_MALLOPT
128140
/* Link with -lmalloc (or -lmpc) on an SGI */
129141
#include <malloc.h>
@@ -149,6 +161,7 @@ static struct methodlist sys_methods[] = {
149161
#endif
150162
{"setprofile", sys_setprofile},
151163
{"settrace", sys_settrace},
164+
{"setcheckinterval", sys_setcheckinterval},
152165
{NULL, NULL} /* sentinel */
153166
};
154167

0 commit comments

Comments
 (0)