Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
df9769ca
Commit
df9769ca
authored
Jan 22, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #1087741 patch.
parent
3cd5e9e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
Lib/test/test_mmap.py
Lib/test/test_mmap.py
+7
-0
Modules/mmapmodule.c
Modules/mmapmodule.c
+1
-1
No files found.
Lib/test/test_mmap.py
View file @
df9769ca
...
...
@@ -420,6 +420,13 @@ class MmapTests(unittest.TestCase):
except
OSError
:
pass
def
test_subclass
(
self
):
class
anon_mmap
(
mmap
.
mmap
):
def
__new__
(
klass
,
*
args
,
**
kwargs
):
return
mmap
.
mmap
.
__new__
(
klass
,
-
1
,
*
args
,
**
kwargs
)
anon_mmap
(
PAGESIZE
)
def
test_main
():
run_unittest
(
MmapTests
)
...
...
Modules/mmapmodule.c
View file @
df9769ca
...
...
@@ -129,7 +129,7 @@ mmap_object_dealloc(mmap_object *m_obj)
}
#endif
/* UNIX */
PyObject_Del
(
m_obj
);
m_obj
->
ob_type
->
tp_free
((
PyObject
*
)
m_obj
);
}
static
PyObject
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment