Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-40024: Update xxxxmodule to use PyModule_AddType.#19119
New issue
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
16 commits Select commit Hold shift + click to select a range
de9587b bpo-40024: Update blake2module to use PyModule_AddType
corona10 af8c626 bpo-40024: Update _queuemodule to use PyModule_AddType
corona10 bc76064 bpo-40024: Update _bz2module to use PyModule_AddType
corona10 f05f7f2 bpo-40024: Update _operator to use PyModule_AddType.
corona10 473c693 bpo-40024: Update _csv.c to use PyModule_AddType.
corona10 08bbe86 bpo-40024: Update _asynciomodule to use PyModule_AddType.
corona10 31f441a bpo-40024: Update multibytecodec to use PyModule_AddType.
corona10 e86a225 bpo-40024: Update _datetimemodule to use PyModule_AddType.
corona10 2f59468 bpo-40024: Update _pickle.c to use PyModule_AddType.
corona10 f4bf212 bpo-40024: Update overlapped.c to use PyModule_AddType.
corona10 2ac5a85 bpo-40024: Update _datetimemoudle for codereview.
corona10 525ede5 bpo-40024: Update multibytecodec.c
corona10 ee0343f bpo-40024: Update _operator.c
corona10 839e4e9 bpo-40024: Update _asynciomodule
corona10 95ea687 bpo-40024: Update macro of _iomodule to use PyModule_AddType.
corona10 ff64806 bpo-40024: Update _cursesmodule to use PyModule_AddType.
corona10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -684,12 +684,8 @@ PyInit__io(void) | ||
| state = get_io_state(m); | ||
| state->initialized = 0; | ||
| #define ADD_TYPE(type, name) \ | ||
corona10 marked this conversation as resolved. Outdated Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| if (PyType_Ready(type) < 0) \ | ||
| goto fail; \ | ||
| Py_INCREF(type); \ | ||
| if (PyModule_AddObject(m, name, (PyObject *)type) < 0){\ | ||
| Py_DECREF(type); \ | ||
| #define ADD_TYPE(type) \ | ||
| if (PyModule_AddType(m, type) < 0){\ | ||
| goto fail; \ | ||
| } | ||
| @@ -717,54 +713,54 @@ PyInit__io(void) | ||
| /* Concrete base types of the IO ABCs. | ||
| (the ABCs themselves are declared through inheritance in io.py) | ||
| */ | ||
| ADD_TYPE(&PyIOBase_Type, "_IOBase"); | ||
| ADD_TYPE(&PyRawIOBase_Type, "_RawIOBase"); | ||
| ADD_TYPE(&PyBufferedIOBase_Type, "_BufferedIOBase"); | ||
| ADD_TYPE(&PyTextIOBase_Type, "_TextIOBase"); | ||
| ADD_TYPE(&PyIOBase_Type); | ||
| ADD_TYPE(&PyRawIOBase_Type); | ||
| ADD_TYPE(&PyBufferedIOBase_Type); | ||
| ADD_TYPE(&PyTextIOBase_Type); | ||
| /* Implementation of concrete IO objects. */ | ||
| /* FileIO */ | ||
| PyFileIO_Type.tp_base = &PyRawIOBase_Type; | ||
| ADD_TYPE(&PyFileIO_Type, "FileIO"); | ||
| ADD_TYPE(&PyFileIO_Type); | ||
| /* BytesIO */ | ||
| PyBytesIO_Type.tp_base = &PyBufferedIOBase_Type; | ||
| ADD_TYPE(&PyBytesIO_Type, "BytesIO"); | ||
| ADD_TYPE(&PyBytesIO_Type); | ||
| if (PyType_Ready(&_PyBytesIOBuffer_Type) < 0) | ||
| goto fail; | ||
| /* StringIO */ | ||
| PyStringIO_Type.tp_base = &PyTextIOBase_Type; | ||
| ADD_TYPE(&PyStringIO_Type, "StringIO"); | ||
| ADD_TYPE(&PyStringIO_Type); | ||
| #ifdef MS_WINDOWS | ||
| /* WindowsConsoleIO */ | ||
| PyWindowsConsoleIO_Type.tp_base = &PyRawIOBase_Type; | ||
| ADD_TYPE(&PyWindowsConsoleIO_Type, "_WindowsConsoleIO"); | ||
| ADD_TYPE(&PyWindowsConsoleIO_Type); | ||
| #endif | ||
| /* BufferedReader */ | ||
| PyBufferedReader_Type.tp_base = &PyBufferedIOBase_Type; | ||
| ADD_TYPE(&PyBufferedReader_Type, "BufferedReader"); | ||
| ADD_TYPE(&PyBufferedReader_Type); | ||
| /* BufferedWriter */ | ||
| PyBufferedWriter_Type.tp_base = &PyBufferedIOBase_Type; | ||
| ADD_TYPE(&PyBufferedWriter_Type, "BufferedWriter"); | ||
| ADD_TYPE(&PyBufferedWriter_Type); | ||
| /* BufferedRWPair */ | ||
| PyBufferedRWPair_Type.tp_base = &PyBufferedIOBase_Type; | ||
| ADD_TYPE(&PyBufferedRWPair_Type, "BufferedRWPair"); | ||
| ADD_TYPE(&PyBufferedRWPair_Type); | ||
| /* BufferedRandom */ | ||
| PyBufferedRandom_Type.tp_base = &PyBufferedIOBase_Type; | ||
| ADD_TYPE(&PyBufferedRandom_Type, "BufferedRandom"); | ||
| ADD_TYPE(&PyBufferedRandom_Type); | ||
| /* TextIOWrapper */ | ||
| PyTextIOWrapper_Type.tp_base = &PyTextIOBase_Type; | ||
| ADD_TYPE(&PyTextIOWrapper_Type, "TextIOWrapper"); | ||
| ADD_TYPE(&PyTextIOWrapper_Type); | ||
| /* IncrementalNewlineDecoder */ | ||
| ADD_TYPE(&PyIncrementalNewlineDecoder_Type, "IncrementalNewlineDecoder"); | ||
| ADD_TYPE(&PyIncrementalNewlineDecoder_Type); | ||
| /* Interned strings */ | ||
| #define ADD_INTERNED(name) \ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.