Commit 9e3febb3 authored by Robert Bradshaw's avatar Robert Bradshaw

Better indentation for profiling macros.

parent 2621466b
...@@ -5745,11 +5745,11 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { ...@@ -5745,11 +5745,11 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
force_init_threads_utility_code = UtilityCode( force_init_threads_utility_code = UtilityCode(
proto=""" proto="""
#ifndef __PYX_FORCE_INIT_THREADS #ifndef __PYX_FORCE_INIT_THREADS
#if PY_VERSION_HEX < 0x02040200 #if PY_VERSION_HEX < 0x02040200
#define __PYX_FORCE_INIT_THREADS 1 #define __PYX_FORCE_INIT_THREADS 1
#else #else
#define __PYX_FORCE_INIT_THREADS 0 #define __PYX_FORCE_INIT_THREADS 0
#endif #endif
#endif #endif
""") """)
...@@ -5760,62 +5760,64 @@ proto=""" ...@@ -5760,62 +5760,64 @@ proto="""
profile_utility_code = UtilityCode(proto=""" profile_utility_code = UtilityCode(proto="""
#ifndef CYTHON_PROFILE #ifndef CYTHON_PROFILE
#define CYTHON_PROFILE 1 #define CYTHON_PROFILE 1
#endif #endif
#ifndef CYTHON_PROFILE_REUSE_FRAME #ifndef CYTHON_PROFILE_REUSE_FRAME
#define CYTHON_PROFILE_REUSE_FRAME 0 #define CYTHON_PROFILE_REUSE_FRAME 0
#endif #endif
#if CYTHON_PROFILE #if CYTHON_PROFILE
#include "compile.h" #include "compile.h"
#include "frameobject.h" #include "frameobject.h"
#include "traceback.h" #include "traceback.h"
#if CYTHON_PROFILE_REUSE_FRAME
#define CYTHON_FRAME_MODIFIER static
#define CYTHON_FRAME_DEL
#else
#define CYTHON_FRAME_MODIFIER
#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) \\ #if CYTHON_PROFILE_REUSE_FRAME
if (unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc)) { \\ #define CYTHON_FRAME_MODIFIER static
__Pyx_use_tracing = __Pyx_TraceSetupAndCall(&%(FRAME_CODE)s, &%(FRAME)s, funcname, srcfile, firstlineno); \\ #define CYTHON_FRAME_DEL
} #else
#define CYTHON_FRAME_MODIFIER
#define CYTHON_FRAME_DEL Py_DECREF(%(FRAME)s)
#endif
#define __Pyx_TraceException() \\ #define __Pyx_TraceDeclarations \\
if (unlikely(__Pyx_use_tracing( && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) { \\ static PyCodeObject *%(FRAME_CODE)s = NULL; \\
PyObject *exc_info = __Pyx_GetExceptionTuple(); \\ CYTHON_FRAME_MODIFIER PyFrameObject *%(FRAME)s = NULL; \\
if (exc_info) { \\ int __Pyx_use_tracing = 0;
PyThreadState_GET()->c_profilefunc( \\
PyThreadState_GET()->c_profileobj, %(FRAME)s, PyTrace_EXCEPTION, exc_info); \\ #define __Pyx_TraceCall(funcname, srcfile, firstlineno) \\
Py_DECREF(exc_info); \\ if (unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc)) { \\
} \\ __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&%(FRAME_CODE)s, &%(FRAME)s, funcname, srcfile, firstlineno); \\
} }
#define __Pyx_TraceException() \\
if (unlikely(__Pyx_use_tracing( && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) { \\
PyObject *exc_info = __Pyx_GetExceptionTuple(); \\
if (exc_info) { \\
PyThreadState_GET()->c_profilefunc( \\
PyThreadState_GET()->c_profileobj, %(FRAME)s, PyTrace_EXCEPTION, exc_info); \\
Py_DECREF(exc_info); \\
} \\
}
#define __Pyx_TraceReturn(result) \\
if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) { \\
PyThreadState_GET()->c_profilefunc( \\
PyThreadState_GET()->c_profileobj, %(FRAME)s, PyTrace_RETURN, (PyObject*)result); \\
CYTHON_FRAME_DEL; \\
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/
static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
#define __Pyx_TraceReturn(result) \\ #else
if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) { \\
PyThreadState_GET()->c_profilefunc( \\
PyThreadState_GET()->c_profileobj, %(FRAME)s, PyTrace_RETURN, (PyObject*)result); \\
CYTHON_FRAME_DEL; \\
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/ #define __Pyx_TraceDeclarations
static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/ #define __Pyx_TraceCall(funcname, srcfile, firstlineno)
#define __Pyx_TraceException()
#define __Pyx_TraceReturn(result)
#else
#define __Pyx_TraceDeclarations
#define __Pyx_TraceCall(funcname, srcfile, firstlineno)
#define __Pyx_TraceException()
#define __Pyx_TraceReturn(result)
#endif /* CYTHON_PROFILE */ #endif /* CYTHON_PROFILE */
""" """
% { % {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment