Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2a28b21

Browse filesBrowse files
gh-132776: Revert Moving memoryview XIData Code to memoryobject.c (gh-132960)
This is a partial revert of gh-132821. It resolves the refleak introduced by that PR.
1 parent 6221765 commit 2a28b21
Copy full SHA for 2a28b21

File tree

Expand file treeCollapse file tree

8 files changed

+284
-339
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+284
-339
lines changed

‎Include/internal/pycore_interp_structs.h

Copy file name to clipboardExpand all lines: Include/internal/pycore_interp_structs.h
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ extern "C" {
99

1010
#include "pycore_ast_state.h" // struct ast_state
1111
#include "pycore_llist.h" // struct llist_node
12-
#include "pycore_memoryobject.h" // struct _memoryobject_state
1312
#include "pycore_opcode_utils.h" // NUM_COMMON_CONSTANTS
1413
#include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR
1514
#include "pycore_structs.h" // PyHamtObject
@@ -913,10 +912,9 @@ struct _is {
913912
struct _dtoa_state dtoa;
914913
struct _py_func_state func_state;
915914
struct _py_code_state code_state;
915+
916916
struct _Py_dict_state dict_state;
917917
struct _Py_exc_state exc_state;
918-
struct _memoryobject_state memobj_state;
919-
920918
struct _Py_mem_interp_free_queue mem_free_queue;
921919

922920
struct ast_state ast;

‎Include/internal/pycore_memoryobject.h

Copy file name to clipboardExpand all lines: Include/internal/pycore_memoryobject.h
-11Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
struct _memoryobject_state {
12-
PyTypeObject *XIBufferViewType;
13-
};
14-
15-
extern PyStatus _PyMemoryView_InitTypes(PyInterpreterState *);
16-
extern void _PyMemoryView_FiniTypes(PyInterpreterState *);
17-
18-
// exported for _interpreters module
19-
PyAPI_FUNC(PyTypeObject *) _PyMemoryView_GetXIBuffewViewType(void);
20-
21-
2211
extern PyTypeObject _PyManagedBuffer_Type;
2312

2413
PyObject *

‎Modules/_interpreters_common.h

Copy file name to clipboardExpand all lines: Modules/_interpreters_common.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
_RESOLVE_MODINIT_FUNC_NAME(NAME)
66

77

8-
#ifdef REGISTERS_HEAP_TYPES
98
static int
109
ensure_xid_class(PyTypeObject *cls, xidatafunc getdata)
1110
{
@@ -17,6 +16,7 @@ ensure_xid_class(PyTypeObject *cls, xidatafunc getdata)
1716
return _PyXIData_RegisterClass(&ctx, cls, getdata);
1817
}
1918

19+
#ifdef REGISTERS_HEAP_TYPES
2020
static int
2121
clear_xid_class(PyTypeObject *cls)
2222
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.