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
55445737
Commit
55445737
authored
Aug 15, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix invisible special methods.
parent
77af99cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+6
-2
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+3
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
55445737
...
@@ -2045,7 +2045,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -2045,7 +2045,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# unless we let PyType_Ready create the slot wrappers we have
# unless we let PyType_Ready create the slot wrappers we have
# a significant performance hit. (See trac #561.)
# a significant performance hit. (See trac #561.)
for
func
in
entry
.
type
.
scope
.
pyfunc_entries
:
for
func
in
entry
.
type
.
scope
.
pyfunc_entries
:
if
func
.
is_special
and
func
.
doc
:
if
func
.
is_special
and
func
.
wrapperbase_cname
:
code
.
putln
(
"{"
);
code
.
putln
(
"{"
);
code
.
putln
(
code
.
putln
(
'PyObject *wrapper = PyObject_GetAttrString((PyObject *)&%s, "%s"); %s'
%
(
'PyObject *wrapper = PyObject_GetAttrString((PyObject *)&%s, "%s"); %s'
%
(
...
...
Cython/Compiler/Nodes.py
View file @
55445737
...
@@ -2111,7 +2111,10 @@ class DefNode(FuncDefNode):
...
@@ -2111,7 +2111,10 @@ class DefNode(FuncDefNode):
entry
.
doc_cname
=
\
entry
.
doc_cname
=
\
Naming
.
funcdoc_prefix
+
prefix
+
name
Naming
.
funcdoc_prefix
+
prefix
+
name
if
entry
.
is_special
:
if
entry
.
is_special
:
entry
.
wrapperbase_cname
=
Naming
.
wrapperbase_prefix
+
prefix
+
name
if
entry
.
name
in
TypeSlots
.
invisible
or
not
entry
.
doc
:
entry
.
wrapperbase_cname
=
None
else
:
entry
.
wrapperbase_cname
=
Naming
.
wrapperbase_prefix
+
prefix
+
name
else
:
else
:
entry
.
doc
=
None
entry
.
doc
=
None
...
@@ -2226,7 +2229,8 @@ class DefNode(FuncDefNode):
...
@@ -2226,7 +2229,8 @@ class DefNode(FuncDefNode):
if
proto_only
:
if
proto_only
:
return
return
if
(
Options
.
docstrings
and
self
.
entry
.
doc
and
if
(
Options
.
docstrings
and
self
.
entry
.
doc
and
not
self
.
entry
.
scope
.
is_property_scope
):
not
self
.
entry
.
scope
.
is_property_scope
and
(
not
self
.
entry
.
is_special
or
self
.
entry
.
wrapperbase_cname
)):
docstr
=
self
.
entry
.
doc
docstr
=
self
.
entry
.
doc
if
docstr
.
is_unicode
:
if
docstr
.
is_unicode
:
docstr
=
docstr
.
utf8encode
()
docstr
=
docstr
.
utf8encode
()
...
...
Cython/Compiler/TypeSlots.py
View file @
55445737
...
@@ -8,6 +8,9 @@ import PyrexTypes
...
@@ -8,6 +8,9 @@ import PyrexTypes
import
StringEncoding
import
StringEncoding
import
sys
import
sys
invisible
=
[
'__cinit__'
,
'__dealloc__'
,
'__richcmp__'
,
'__nonzero__'
,
'__bool__'
]
class
Signature
(
object
):
class
Signature
(
object
):
# Method slot signature descriptor.
# Method slot signature descriptor.
#
#
...
...
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