| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -529,14 +529,49 @@ struct _py_func_state { | |
|
|
||
| /****** type state *********/ | ||
|
|
||
| /* One TYPE(name) per textual _PyStaticType_InitBuiltin / | ||
| _PyStructSequence_InitBuiltin{,WithFlags} call site outside the static_types | ||
| and static_exceptions arrays. Count-only -- the calls themselves stay at | ||
| their existing locations. Forgetting an entry trips the | ||
| `index < _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES` assertion in | ||
| Objects/typeobject.c on interpreter start. */ | ||
| #define _Py_FOREACH_STATIC_EXTRA_TYPE(TYPE) \ | ||
| /* Python/crossinterp_exceptions.h */ \ | ||
| TYPE(_PyExc_InterpreterError) \ | ||
| TYPE(_PyExc_InterpreterNotFoundError) \ | ||
| /* Objects/unicodeobject.c */ \ | ||
| TYPE(EncodingMapType) \ | ||
| TYPE(PyFieldNameIter_Type) \ | ||
| TYPE(PyFormatterIter_Type) \ | ||
| /* Python/thread.c */ \ | ||
| TYPE(ThreadInfoType) \ | ||
| /* Python/sysmodule.c */ \ | ||
| TYPE(Hash_InfoType) \ | ||
| TYPE(AsyncGenHooksType) \ | ||
| TYPE(VersionInfoType) \ | ||
| TYPE(FlagsType) \ | ||
| TYPE(WindowsVersionType) \ | ||
| /* Python/errors.c */ \ | ||
| TYPE(UnraisableHookArgsType) \ | ||
| /* Objects/longobject.c */ \ | ||
| TYPE(Int_InfoType) \ | ||
| /* Objects/floatobject.c */ \ | ||
| TYPE(FloatInfoType) | ||
|
|
||
| #define _PY_COUNT_STATIC_TYPE_(name) + 1 | ||
| #define _Py_NUM_MANAGED_STATIC_EXTRA_TYPES \ | ||
| (0 _Py_FOREACH_STATIC_EXTRA_TYPE(_PY_COUNT_STATIC_TYPE_)) | ||
|
|
||
| /* For now we hard-code this to a value for which we are confident | ||
| all the static builtin types will fit (for all builds). | ||
| If you add a new static type to the standard library, you may have to | ||
| update one of these numbers. | ||
| */ | ||
| #define _Py_NUM_MANAGED_PREINITIALIZED_TYPES 120 | ||
| #define _Py_NUM_STATIC_EXCEPTIONS 69 | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityNow you mange the number of _Py_NUM_STATIC_EXCEPTIONS manually, I beleive that this is not what we wanted
Sorry, something went wrong.
All reactions
|
||
| #define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES \ | ||
| (_Py_NUM_MANAGED_PREINITIALIZED_TYPES + 83) | ||
| (_Py_NUM_MANAGED_PREINITIALIZED_TYPES + _Py_NUM_STATIC_EXCEPTIONS \ | ||
| + _Py_NUM_MANAGED_STATIC_EXTRA_TYPES) | ||
| #define _Py_MAX_MANAGED_STATIC_EXT_TYPES 10 | ||
| #define _Py_MAX_MANAGED_STATIC_TYPES \ | ||
| (_Py_MAX_MANAGED_STATIC_BUILTIN_TYPES + _Py_MAX_MANAGED_STATIC_EXT_TYPES) | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityStill _Py_NUM_MANAGED_PREINITIALIZED_TYPES is manged by hand.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.