summaryrefslogtreecommitdiffstats
path: root/Modules/_hotshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_hotshot.c')
-rw-r--r--Modules/_hotshot.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/_hotshot.c b/Modules/_hotshot.c
index 3b8d616..deaf9dd 100644
--- a/Modules/_hotshot.c
+++ b/Modules/_hotshot.c
@@ -2,11 +2,11 @@
* This is the High Performance Python Profiler portion of HotShot.
*/
-#include <Python.h>
-#include <compile.h>
-#include <eval.h>
-#include <frameobject.h>
-#include <structmember.h>
+#include "Python.h"
+#include "compile.h"
+#include "eval.h"
+#include "frameobject.h"
+#include "structmember.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -1452,12 +1452,12 @@ write_header(ProfilerObject *self)
pack_add_info(self, "executable-version", buffer);
#ifdef MS_WIN32
- sprintf(cwdbuffer, "%I64d", frequency.QuadPart);
+ PyOS_snprintf(cwdbuffer, sizeof(cwdbuffer), "%I64d", frequency.QuadPart);
pack_add_info(self, "reported-performance-frequency", cwdbuffer);
#else
- sprintf(cwdbuffer, "%lu", rusage_diff);
+ PyOS_snprintf(cwdbuffer, sizeof(cwdbuffer), "%lu", rusage_diff);
pack_add_info(self, "observed-interval-getrusage", cwdbuffer);
- sprintf(cwdbuffer, "%lu", timeofday_diff);
+ PyOS_snprintf(cwdbuffer, sizeof(cwdbuffer), "%lu", timeofday_diff);
pack_add_info(self, "observed-interval-gettimeofday", cwdbuffer);
#endif