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
05cde011
Commit
05cde011
authored
Oct 07, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trivial cfunc -> py conversion.
parent
6b21b89a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+11
-0
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-1
No files found.
Cython/Compiler/PyrexTypes.py
View file @
05cde011
...
...
@@ -2641,6 +2641,17 @@ class CFuncType(CType):
assert
not
self
.
is_fused
specialize_entry
(
entry
,
cname
)
def
create_to_py_utility_code
(
self
,
env
):
import
re
from
.UtilityCode
import
CythonUtilityCode
safe_typename
=
re
.
sub
(
'[^a-zA-Z0-9]'
,
'__'
,
self
.
declaration_code
(
""
))
self
.
to_py_function
=
"__Pyx_CFunc_%s_to_py"
%
safe_typename
context
=
{
'cname'
:
self
.
to_py_function
,
}
env
.
use_utility_code
(
CythonUtilityCode
.
load
(
"cfunc.to_py"
,
"CFuncConvert.pyx"
,
context
=
context
))
return
True
def
specialize_entry
(
entry
,
cname
):
"""
...
...
Cython/Compiler/Symtab.py
View file @
05cde011
...
...
@@ -303,7 +303,7 @@ class Scope(object):
self
.
name
=
name
self
.
outer_scope
=
outer_scope
self
.
parent_scope
=
parent_scope
mangled_name
=
"%d%s_"
%
(
len
(
name
),
name
)
mangled_name
=
"%d%s_"
%
(
len
(
name
),
name
.
replace
(
'.'
,
'_dot_'
)
)
qual_scope
=
self
.
qualifying_scope
()
if
qual_scope
:
self
.
qualified_name
=
qual_scope
.
qualify_name
(
name
)
...
...
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