Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
1 Star 0 Fork 0

source-code-analysis/python3.7.4

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (1)
master
master
Branches (1)
master
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (1)
master
python3.7.4
/
Modules
/
clinic
/
gcmodule.c.h
python3.7.4
/
Modules
/
clinic
/
gcmodule.c.h
gcmodule.c.h 8.32 KB
Copy Edit Raw Blame History
zhangweibo authored 2021年11月17日 13:49 +08:00 . git init
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
/*[clinic input]
preserve
[clinic start generated code]*/
PyDoc_STRVAR(gc_enable__doc__,
"enable($module, /)\n"
"--\n"
"\n"
"Enable automatic garbage collection.");
#define GC_ENABLE_METHODDEF \
{"enable", (PyCFunction)gc_enable, METH_NOARGS, gc_enable__doc__},
static PyObject *
gc_enable_impl(PyObject *module);
static PyObject *
gc_enable(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return gc_enable_impl(module);
}
PyDoc_STRVAR(gc_disable__doc__,
"disable($module, /)\n"
"--\n"
"\n"
"Disable automatic garbage collection.");
#define GC_DISABLE_METHODDEF \
{"disable", (PyCFunction)gc_disable, METH_NOARGS, gc_disable__doc__},
static PyObject *
gc_disable_impl(PyObject *module);
static PyObject *
gc_disable(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return gc_disable_impl(module);
}
PyDoc_STRVAR(gc_isenabled__doc__,
"isenabled($module, /)\n"
"--\n"
"\n"
"Returns true if automatic garbage collection is enabled.");
#define GC_ISENABLED_METHODDEF \
{"isenabled", (PyCFunction)gc_isenabled, METH_NOARGS, gc_isenabled__doc__},
static int
gc_isenabled_impl(PyObject *module);
static PyObject *
gc_isenabled(PyObject *module, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
int _return_value;
_return_value = gc_isenabled_impl(module);
if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
}
return_value = PyBool_FromLong((long)_return_value);
exit:
return return_value;
}
PyDoc_STRVAR(gc_collect__doc__,
"collect($module, /, generation=2)\n"
"--\n"
"\n"
"Run the garbage collector.\n"
"\n"
"With no arguments, run a full collection. The optional argument\n"
"may be an integer specifying which generation to collect. A ValueError\n"
"is raised if the generation number is invalid.\n"
"\n"
"The number of unreachable objects is returned.");
#define GC_COLLECT_METHODDEF \
{"collect", (PyCFunction)gc_collect, METH_FASTCALL|METH_KEYWORDS, gc_collect__doc__},
static Py_ssize_t
gc_collect_impl(PyObject *module, int generation);
static PyObject *
gc_collect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"generation", NULL};
static _PyArg_Parser _parser = {"|i:collect", _keywords, 0};
int generation = NUM_GENERATIONS - 1;
Py_ssize_t _return_value;
if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&generation)) {
goto exit;
}
_return_value = gc_collect_impl(module, generation);
if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
}
return_value = PyLong_FromSsize_t(_return_value);
exit:
return return_value;
}
PyDoc_STRVAR(gc_set_debug__doc__,
"set_debug($module, flags, /)\n"
"--\n"
"\n"
"Set the garbage collection debugging flags.\n"
"\n"
" flags\n"
" An integer that can have the following bits turned on:\n"
" DEBUG_STATS - Print statistics during collection.\n"
" DEBUG_COLLECTABLE - Print collectable objects found.\n"
" DEBUG_UNCOLLECTABLE - Print unreachable but uncollectable objects\n"
" found.\n"
" DEBUG_SAVEALL - Save objects to gc.garbage rather than freeing them.\n"
" DEBUG_LEAK - Debug leaking programs (everything but STATS).\n"
"\n"
"Debugging information is written to sys.stderr.");
#define GC_SET_DEBUG_METHODDEF \
{"set_debug", (PyCFunction)gc_set_debug, METH_O, gc_set_debug__doc__},
static PyObject *
gc_set_debug_impl(PyObject *module, int flags);
static PyObject *
gc_set_debug(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
int flags;
if (!PyArg_Parse(arg, "i:set_debug", &flags)) {
goto exit;
}
return_value = gc_set_debug_impl(module, flags);
exit:
return return_value;
}
PyDoc_STRVAR(gc_get_debug__doc__,
"get_debug($module, /)\n"
"--\n"
"\n"
"Get the garbage collection debugging flags.");
#define GC_GET_DEBUG_METHODDEF \
{"get_debug", (PyCFunction)gc_get_debug, METH_NOARGS, gc_get_debug__doc__},
static int
gc_get_debug_impl(PyObject *module);
static PyObject *
gc_get_debug(PyObject *module, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
int _return_value;
_return_value = gc_get_debug_impl(module);
if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
}
return_value = PyLong_FromLong((long)_return_value);
exit:
return return_value;
}
PyDoc_STRVAR(gc_get_threshold__doc__,
"get_threshold($module, /)\n"
"--\n"
"\n"
"Return the current collection thresholds.");
#define GC_GET_THRESHOLD_METHODDEF \
{"get_threshold", (PyCFunction)gc_get_threshold, METH_NOARGS, gc_get_threshold__doc__},
static PyObject *
gc_get_threshold_impl(PyObject *module);
static PyObject *
gc_get_threshold(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return gc_get_threshold_impl(module);
}
PyDoc_STRVAR(gc_get_count__doc__,
"get_count($module, /)\n"
"--\n"
"\n"
"Return a three-tuple of the current collection counts.");
#define GC_GET_COUNT_METHODDEF \
{"get_count", (PyCFunction)gc_get_count, METH_NOARGS, gc_get_count__doc__},
static PyObject *
gc_get_count_impl(PyObject *module);
static PyObject *
gc_get_count(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return gc_get_count_impl(module);
}
PyDoc_STRVAR(gc_get_objects__doc__,
"get_objects($module, /)\n"
"--\n"
"\n"
"Return a list of objects tracked by the collector (excluding the list returned).");
#define GC_GET_OBJECTS_METHODDEF \
{"get_objects", (PyCFunction)gc_get_objects, METH_NOARGS, gc_get_objects__doc__},
static PyObject *
gc_get_objects_impl(PyObject *module);
static PyObject *
gc_get_objects(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return gc_get_objects_impl(module);
}
PyDoc_STRVAR(gc_get_stats__doc__,
"get_stats($module, /)\n"
"--\n"
"\n"
"Return a list of dictionaries containing per-generation statistics.");
#define GC_GET_STATS_METHODDEF \
{"get_stats", (PyCFunction)gc_get_stats, METH_NOARGS, gc_get_stats__doc__},
static PyObject *
gc_get_stats_impl(PyObject *module);
static PyObject *
gc_get_stats(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return gc_get_stats_impl(module);
}
PyDoc_STRVAR(gc_is_tracked__doc__,
"is_tracked($module, obj, /)\n"
"--\n"
"\n"
"Returns true if the object is tracked by the garbage collector.\n"
"\n"
"Simple atomic objects will return false.");
#define GC_IS_TRACKED_METHODDEF \
{"is_tracked", (PyCFunction)gc_is_tracked, METH_O, gc_is_tracked__doc__},
PyDoc_STRVAR(gc_freeze__doc__,
"freeze($module, /)\n"
"--\n"
"\n"
"Freeze all current tracked objects and ignore them for future collections.\n"
"\n"
"This can be used before a POSIX fork() call to make the gc copy-on-write friendly.\n"
"Note: collection before a POSIX fork() call may free pages for future allocation\n"
"which can cause copy-on-write.");
#define GC_FREEZE_METHODDEF \
{"freeze", (PyCFunction)gc_freeze, METH_NOARGS, gc_freeze__doc__},
static PyObject *
gc_freeze_impl(PyObject *module);
static PyObject *
gc_freeze(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return gc_freeze_impl(module);
}
PyDoc_STRVAR(gc_unfreeze__doc__,
"unfreeze($module, /)\n"
"--\n"
"\n"
"Unfreeze all objects in the permanent generation.\n"
"\n"
"Put all objects in the permanent generation back into oldest generation.");
#define GC_UNFREEZE_METHODDEF \
{"unfreeze", (PyCFunction)gc_unfreeze, METH_NOARGS, gc_unfreeze__doc__},
static PyObject *
gc_unfreeze_impl(PyObject *module);
static PyObject *
gc_unfreeze(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return gc_unfreeze_impl(module);
}
PyDoc_STRVAR(gc_get_freeze_count__doc__,
"get_freeze_count($module, /)\n"
"--\n"
"\n"
"Return the number of objects in the permanent generation.");
#define GC_GET_FREEZE_COUNT_METHODDEF \
{"get_freeze_count", (PyCFunction)gc_get_freeze_count, METH_NOARGS, gc_get_freeze_count__doc__},
static Py_ssize_t
gc_get_freeze_count_impl(PyObject *module);
static PyObject *
gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
Py_ssize_t _return_value;
_return_value = gc_get_freeze_count_impl(module);
if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
}
return_value = PyLong_FromSsize_t(_return_value);
exit:
return return_value;
}
/*[clinic end generated code: output=21dc9270b10b7891 input=a9049054013a1b77]*/
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

No description
Cancel

Releases

No release

Contributors

All

Language(Optional)

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/python_sourcecode/python3.7.4.git
git@gitee.com:python_sourcecode/python3.7.4.git
python_sourcecode
python3.7.4
python3.7.4
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /