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
736d715f
Commit
736d715f
authored
Jun 06, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git+ssh://github.com/cython/cython
parents
977f99c4
e05dc496
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+5
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+3
-3
No files found.
Cython/Compiler/Code.py
View file @
736d715f
...
...
@@ -30,6 +30,7 @@ from . import Naming
from
.
import
Options
from
.
import
DebugFlags
from
.
import
StringEncoding
from
.
import
Version
from
..
import
Utils
from
.Scanning
import
SourceDescriptor
from
..StringIOTree
import
StringIOTree
...
...
@@ -1818,6 +1819,10 @@ class CCodeWriter(object):
self
.
putln
(
"%sconst char *%s = NULL;"
%
(
unused
,
Naming
.
filename_cname
))
self
.
putln
(
"%sint %s = 0;"
%
(
unused
,
Naming
.
clineno_cname
))
def
put_generated_by
(
self
):
self
.
putln
(
"/* Generated by Cython %s */"
%
Version
.
watermark
)
self
.
putln
(
""
)
def
put_h_guard
(
self
,
guard
):
self
.
putln
(
"#ifndef %s"
%
guard
)
self
.
putln
(
"#define %s"
%
guard
)
...
...
Cython/Compiler/ModuleNode.py
View file @
736d715f
...
...
@@ -21,7 +21,6 @@ from . import Naming
from
.
import
Nodes
from
.
import
Options
from
.
import
TypeSlots
from
.
import
Version
from
.
import
PyrexTypes
from
.Errors
import
error
,
warning
...
...
@@ -140,6 +139,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
else
:
i_code
=
None
h_code
.
put_generated_by
()
h_guard
=
Naming
.
h_guard_prefix
+
self
.
api_name
(
env
)
h_code
.
put_h_guard
(
h_guard
)
h_code
.
putln
(
""
)
...
...
@@ -207,6 +207,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
result
.
api_file
=
replace_suffix
(
result
.
c_file
,
"_api.h"
)
h_code
=
Code
.
CCodeWriter
()
Code
.
GlobalState
(
h_code
,
self
)
h_code
.
put_generated_by
()
api_guard
=
Naming
.
api_guard_prefix
+
self
.
api_name
(
env
)
h_code
.
put_h_guard
(
api_guard
)
h_code
.
putln
(
'#include "Python.h"'
)
...
...
@@ -562,8 +563,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
self
.
generate_cfunction_declarations
(
module
,
modulecode
,
defined_here
)
def
generate_module_preamble
(
self
,
env
,
cimported_modules
,
metadata
,
code
):
code
.
putln
(
"/* Generated by Cython %s */"
%
Version
.
watermark
)
code
.
putln
(
""
)
code
.
put_generated_by
()
if
metadata
:
code
.
putln
(
"/* BEGIN: Cython Metadata"
)
code
.
putln
(
json
.
dumps
(
metadata
,
indent
=
4
,
sort_keys
=
True
))
...
...
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