Commit feab23f8 authored by Tim Peters's avatar Tim Peters

My editor can't deal with long backslash-continued strings. Changed 'em.

This still doesn't compile on Windows, but at least I have a shot at
fixing that now.
parent 106bdd3b
...@@ -14,13 +14,14 @@ ...@@ -14,13 +14,14 @@
/* /*
* Which timer to use should be made more configurable, but that should not * Which timer to use should be made more configurable, but that should not
* be difficult. This will do fo now. * be difficult. This will do for now.
*/ */
#ifdef MS_WIN32 #ifdef MS_WIN32
#include <windows.h> #include <windows.h>
#include <largeint.h> #include <largeint.h>
#include <direct.h> /* for getcwd() */ #include <direct.h> /* for getcwd() */
typedef LARGE_INTEGER hs_time; typedef LARGE_INTEGER hs_time;
#else #else
#ifndef HAVE_GETTIMEOFDAY #ifndef HAVE_GETTIMEOFDAY
#error "This module requires gettimeofday() on non-Windows platforms!" #error "This module requires gettimeofday() on non-Windows platforms!"
...@@ -89,9 +90,9 @@ static PyObject * ProfilerError = NULL; ...@@ -89,9 +90,9 @@ static PyObject * ProfilerError = NULL;
/* The log reader... */ /* The log reader... */
static char logreader_close__doc__[] = "\ static char logreader_close__doc__[] =
close()\n\ "close()\n"
Close the log file, preventing additional records from being read."; "Close the log file, preventing additional records from being read.";
static PyObject * static PyObject *
logreader_close(LogReaderObject *self, PyObject *args) logreader_close(LogReaderObject *self, PyObject *args)
...@@ -453,9 +454,9 @@ logreader_sq_item(LogReaderObject *self, int index) ...@@ -453,9 +454,9 @@ logreader_sq_item(LogReaderObject *self, int index)
return result; return result;
} }
static char next__doc__[] = "\ static char next__doc__[] =
next() -> event-info\n\ "next() -> event-info\n"
Return the next event record from the log file."; "Return the next event record from the log file.";
static PyObject * static PyObject *
logreader_next(LogReaderObject *self, PyObject *args) logreader_next(LogReaderObject *self, PyObject *args)
...@@ -750,7 +751,7 @@ tracer_callback(ProfilerObject *self, PyFrameObject *frame, int what, ...@@ -750,7 +751,7 @@ tracer_callback(ProfilerObject *self, PyFrameObject *frame, int what,
/* A couple of useful helper functions. */ /* A couple of useful helper functions. */
#ifdef MS_WIN32 #ifdef MS_WIN32
static LARGE_INTEGER frequency = {0,0}; static LARGE_INTEGER frequency = {0, 0};
#endif #endif
static unsigned long timeofday_diff = 0; static unsigned long timeofday_diff = 0;
...@@ -861,9 +862,9 @@ is_available(ProfilerObject *self) ...@@ -861,9 +862,9 @@ is_available(ProfilerObject *self)
/* Profiler object interface methods. */ /* Profiler object interface methods. */
static char close__doc__[] = "\ static char close__doc__[] =
close()\n\ "close()\n"
Shut down this profiler and close the log files, even if its active."; "Shut down this profiler and close the log files, even if its active.";
static PyObject * static PyObject *
profiler_close(ProfilerObject *self, PyObject *args) profiler_close(ProfilerObject *self, PyObject *args)
...@@ -882,9 +883,9 @@ profiler_close(ProfilerObject *self, PyObject *args) ...@@ -882,9 +883,9 @@ profiler_close(ProfilerObject *self, PyObject *args)
return result; return result;
} }
static char runcall__doc__[] = "\ static char runcall__doc__[] =
runcall(callable[, args[, kw]]) -> callable()\n\ "runcall(callable[, args[, kw]]) -> callable()\n"
Profile a specific function call, returning the result of that call."; "Profile a specific function call, returning the result of that call.";
static PyObject * static PyObject *
profiler_runcall(ProfilerObject *self, PyObject *args) profiler_runcall(ProfilerObject *self, PyObject *args)
...@@ -905,10 +906,10 @@ profiler_runcall(ProfilerObject *self, PyObject *args) ...@@ -905,10 +906,10 @@ profiler_runcall(ProfilerObject *self, PyObject *args)
return result; return result;
} }
static char runcode__doc__[] = "\ static char runcode__doc__[] =
runcode(code, globals[, locals])\n\ "runcode(code, globals[, locals])\n"
Execute a code object while collecting profile data. If locals is omitted,\n\ "Execute a code object while collecting profile data. If locals is\n"
globals is used for the locals as well."; "omitted, globals is used for the locals as well.";
static PyObject * static PyObject *
profiler_runcode(ProfilerObject *self, PyObject *args) profiler_runcode(ProfilerObject *self, PyObject *args)
...@@ -944,9 +945,9 @@ profiler_runcode(ProfilerObject *self, PyObject *args) ...@@ -944,9 +945,9 @@ profiler_runcode(ProfilerObject *self, PyObject *args)
return result; return result;
} }
static char start__doc__[] = "\ static char start__doc__[] =
start()\n\ "start()\n"
Install this profiler for the current thread."; "Install this profiler for the current thread.";
static PyObject * static PyObject *
profiler_start(ProfilerObject *self, PyObject *args) profiler_start(ProfilerObject *self, PyObject *args)
...@@ -960,9 +961,9 @@ profiler_start(ProfilerObject *self, PyObject *args) ...@@ -960,9 +961,9 @@ profiler_start(ProfilerObject *self, PyObject *args)
return result; return result;
} }
static char stop__doc__[] = "\ static char stop__doc__[] =
stop()\n\ "stop()\n"
Remove this profiler from the current thread."; "Remove this profiler from the current thread.";
static PyObject * static PyObject *
profiler_stop(ProfilerObject *self, PyObject *args) profiler_stop(ProfilerObject *self, PyObject *args)
...@@ -1035,23 +1036,23 @@ profiler_getattr(ProfilerObject *self, char *name) ...@@ -1035,23 +1036,23 @@ profiler_getattr(ProfilerObject *self, char *name)
} }
static char profiler_object__doc__[] = "\ static char profiler_object__doc__[] =
High-performance profiler object.\n\ "High-performance profiler object.\n"
\n\ "\n"
Methods:\n\ "Methods:\n"
\n\ "\n"
close(): Stop the profiler and close the log files.\n\ "close(): Stop the profiler and close the log files.\n"
runcall(): Run a single function call with profiling enabled.\n\ "runcall(): Run a single function call with profiling enabled.\n"
runcode(): Execute a code object with profiling enabled.\n\ "runcode(): Execute a code object with profiling enabled.\n"
start(): Install the profiler and return.\n\ "start(): Install the profiler and return.\n"
stop(): Remove the profiler.\n\ "stop(): Remove the profiler.\n"
\n\ "\n"
Attributes (read-only):\n\ "Attributes (read-only):\n"
\n\ "\n"
callcount: The number of low-level calls to the profiler.\n\ "callcount: The number of low-level calls to the profiler.\n"
closed: True if the profiler has already been closed.\n\ "closed: True if the profiler has already been closed.\n"
lineevents: True if SET_LINENO events are reported to the profiler.\n\ "lineevents: True if SET_LINENO events are reported to the profiler.\n"
linetimings: True if SET_LINENO events collect timing information."; "linetimings: True if SET_LINENO events collect timing information.";
static PyTypeObject ProfilerType = { static PyTypeObject ProfilerType = {
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
...@@ -1301,14 +1302,14 @@ hotshot_profiler(PyObject *unused, PyObject *args) ...@@ -1301,14 +1302,14 @@ hotshot_profiler(PyObject *unused, PyObject *args)
static char resolution__doc__[] = static char resolution__doc__[] =
#ifdef MS_WIN32 #ifdef MS_WIN32
"resolution() -> (performance-counter-ticks, update-frequency)\n\ "resolution() -> (performance-counter-ticks, update-frequency)\n"
Return the resolution of the timer provided by the QueryPerformanceCounter()\n\ "Return the resolution of the timer provided by the QueryPerformanceCounter()\n"
function. The first value is the smallest observed change, and the second\n\ "function. The first value is the smallest observed change, and the second\n"
if the result of QueryPerformanceFrequency()."; "is the result of QueryPerformanceFrequency().";
#else #else
"resolution() -> (gettimeofday-usecs, getrusage-usecs)\n\ "resolution() -> (gettimeofday-usecs, getrusage-usecs)\n"
Return the resolution of the timers provided by the gettimeofday() and\n\ "Return the resolution of the timers provided by the gettimeofday() and\n"
getrusage() system calls, or -1 if the call is not supported."; "getrusage() system calls, or -1 if the call is not supported.";
#endif #endif
static PyObject * static PyObject *
......
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