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
2621466b
Commit
2621466b
authored
Jan 09, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maybe fix #473 -- MSVC strict about variable declaration placement.
parent
f6eb8dd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+3
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+8
-3
No files found.
Cython/Compiler/Code.py
View file @
2621466b
...
...
@@ -1281,6 +1281,9 @@ class CCodeWriter(object):
def
put_finish_refcount_context
(
self
):
self
.
putln
(
"__Pyx_RefNannyFinishContext();"
)
def
put_trace_declarations
(
self
):
self
.
putln
(
'__Pyx_TraceDeclarations'
);
def
put_trace_call
(
self
,
name
,
pos
):
self
.
putln
(
'__Pyx_TraceCall("%s", %s[%s], %s);'
%
(
name
,
Naming
.
filetable_cname
,
self
.
lookup_filename
(
pos
[
0
]),
pos
[
1
]));
...
...
Cython/Compiler/Nodes.py
View file @
2621466b
...
...
@@ -1086,6 +1086,8 @@ class FuncDefNode(StatNode, BlockNode):
init
))
tempvardecl_code
=
code
.
insertion_point
()
self
.
generate_keyword_list
(
code
)
if
profile
:
code
.
put_trace_declarations
()
# ----- Extern library function declarations
lenv
.
generate_library_function_declarations
(
code
)
# ----- GIL acquisition
...
...
@@ -5779,10 +5781,12 @@ profile_utility_code = UtilityCode(proto="""
#define CYTHON_FRAME_DEL Py_DECREF(%(FRAME)s)
#endif
#define __Pyx_TraceDeclarations
\
\
static PyCodeObject *%(FRAME_CODE)s = NULL;
\
\
CYTHON_FRAME_MODIFIER PyFrameObject *%(FRAME)s = NULL;
\
\
int __Pyx_use_tracing = 0;
#define __Pyx_TraceCall(funcname, srcfile, firstlineno)
\
\
static PyCodeObject *%(FRAME_CODE)s = NULL;
\
\
CYTHON_FRAME_MODIFIER PyFrameObject *%(FRAME)s = NULL;
\
\
int __Pyx_use_tracing = 0;
\
\
if (unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc)) {
\
\
__Pyx_use_tracing = __Pyx_TraceSetupAndCall(&%(FRAME_CODE)s, &%(FRAME)s, funcname, srcfile, firstlineno);
\
\
}
...
...
@@ -5808,6 +5812,7 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha
static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
#else
#define __Pyx_TraceDeclarations
#define __Pyx_TraceCall(funcname, srcfile, firstlineno)
#define __Pyx_TraceException()
#define __Pyx_TraceReturn(result)
...
...
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