mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
sys.check_interval=x -> sys.setcheckinterval(x)
This commit is contained in:
parent
e791c2e441
commit
a0d7a23398
2 changed files with 14 additions and 0 deletions
|
@ -36,6 +36,7 @@ FILE *sysgetfile PROTO((char *, FILE *));
|
||||||
void initsys PROTO((void));
|
void initsys PROTO((void));
|
||||||
|
|
||||||
extern DL_IMPORT object *sys_trace, *sys_profile;
|
extern DL_IMPORT object *sys_trace, *sys_profile;
|
||||||
|
extern DL_IMPORT int sys_checkinterval;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ Data members:
|
||||||
#include "osdefs.h"
|
#include "osdefs.h"
|
||||||
|
|
||||||
object *sys_trace, *sys_profile;
|
object *sys_trace, *sys_profile;
|
||||||
|
int sys_checkinterval;
|
||||||
|
|
||||||
static object *sysdict;
|
static object *sysdict;
|
||||||
|
|
||||||
|
@ -124,6 +125,17 @@ sys_setprofile(self, args)
|
||||||
return None;
|
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
|
#ifdef USE_MALLOPT
|
||||||
/* Link with -lmalloc (or -lmpc) on an SGI */
|
/* Link with -lmalloc (or -lmpc) on an SGI */
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
@ -149,6 +161,7 @@ static struct methodlist sys_methods[] = {
|
||||||
#endif
|
#endif
|
||||||
{"setprofile", sys_setprofile},
|
{"setprofile", sys_setprofile},
|
||||||
{"settrace", sys_settrace},
|
{"settrace", sys_settrace},
|
||||||
|
{"setcheckinterval", sys_setcheckinterval},
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue