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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
5a6e79fd
Commit
5a6e79fd
authored
Jan 01, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warning about C++ char* literal conversion
parent
375d0845
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-2
No files found.
Cython/Compiler/ModuleNode.py
View file @
5a6e79fd
...
@@ -1961,7 +1961,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1961,7 +1961,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
def
generate_import_star
(
self
,
env
,
code
):
def
generate_import_star
(
self
,
env
,
code
):
env
.
use_utility_code
(
streq_utility_code
)
env
.
use_utility_code
(
streq_utility_code
)
code
.
putln
()
code
.
putln
()
code
.
putln
(
"static char* %s_type_names[] = {"
%
Naming
.
import_star
)
code
.
putln
(
"static c
onst c
har* %s_type_names[] = {"
%
Naming
.
import_star
)
for
name
,
entry
in
sorted
(
env
.
entries
.
items
()):
for
name
,
entry
in
sorted
(
env
.
entries
.
items
()):
if
entry
.
is_type
:
if
entry
.
is_type
:
code
.
putln
(
'"%s",'
%
name
)
code
.
putln
(
'"%s",'
%
name
)
...
@@ -1970,7 +1970,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1970,7 +1970,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
()
code
.
putln
()
code
.
enter_cfunc_scope
()
# as we need labels
code
.
enter_cfunc_scope
()
# as we need labels
code
.
putln
(
"static int %s(PyObject *o, PyObject* py_name, char *name) {"
%
Naming
.
import_star_set
)
code
.
putln
(
"static int %s(PyObject *o, PyObject* py_name, char *name) {"
%
Naming
.
import_star_set
)
code
.
putln
(
"char** type_name = %s_type_names;"
%
Naming
.
import_star
)
code
.
putln
(
"c
onst c
har** type_name = %s_type_names;"
%
Naming
.
import_star
)
code
.
putln
(
"while (*type_name) {"
)
code
.
putln
(
"while (*type_name) {"
)
code
.
putln
(
"if (__Pyx_StrEq(name, *type_name)) {"
)
code
.
putln
(
"if (__Pyx_StrEq(name, *type_name)) {"
)
code
.
putln
(
'PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);'
)
code
.
putln
(
'PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", 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