Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
8e6bbf40
Commit
8e6bbf40
authored
Sep 26, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable auto-pickling for some internal modules to reduce their code overhead.
parent
ac1c4143
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
Cython/Compiler/Scanning.py
Cython/Compiler/Scanning.py
+13
-1
Cython/Runtime/refnanny.pyx
Cython/Runtime/refnanny.pyx
+1
-1
No files found.
Cython/Compiler/Scanning.py
View file @
8e6bbf40
# cython: infer_types=True, language_level=3, py2_import=True
# cython: infer_types=True, language_level=3, py2_import=True
, auto_pickle=False
#
#
# Cython Scanner
# Cython Scanner
#
#
...
@@ -63,6 +63,12 @@ class Method(object):
...
@@ -63,6 +63,12 @@ class Method(object):
# self.kwargs is almost always unused => avoid call overhead
# self.kwargs is almost always unused => avoid call overhead
return
method
(
text
,
**
self
.
kwargs
)
if
self
.
kwargs
is
not
None
else
method
(
text
)
return
method
(
text
,
**
self
.
kwargs
)
if
self
.
kwargs
is
not
None
else
method
(
text
)
def
__copy__
(
self
):
return
self
# immutable, no need to copy
def
__deepcopy__
(
self
,
memo
):
return
self
# immutable, no need to copy
#------------------------------------------------------------------
#------------------------------------------------------------------
...
@@ -188,6 +194,12 @@ class SourceDescriptor(object):
...
@@ -188,6 +194,12 @@ class SourceDescriptor(object):
except
AttributeError
:
except
AttributeError
:
return
False
return
False
def
__copy__
(
self
):
return
self
# immutable, no need to copy
def
__deepcopy__
(
self
,
memo
):
return
self
# immutable, no need to copy
class
FileSourceDescriptor
(
SourceDescriptor
):
class
FileSourceDescriptor
(
SourceDescriptor
):
"""
"""
...
...
Cython/Runtime/refnanny.pyx
View file @
8e6bbf40
# cython: language_level=3
# cython: language_level=3
, auto_pickle=False
from
cpython.ref
cimport
PyObject
,
Py_INCREF
,
Py_DECREF
,
Py_XDECREF
,
Py_XINCREF
from
cpython.ref
cimport
PyObject
,
Py_INCREF
,
Py_DECREF
,
Py_XDECREF
,
Py_XINCREF
from
cpython.exc
cimport
PyErr_Fetch
,
PyErr_Restore
from
cpython.exc
cimport
PyErr_Fetch
,
PyErr_Restore
...
...
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