diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-11-28 20:27:42 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-11-28 20:27:42 (GMT) |
commit | 885d457709c1d680c899dc3d035a47c8fb514cfa (patch) | |
tree | d16b3a6f89208a1b46b786958a316ef9075d3fab /Modules/_hotshot.c | |
parent | 05bd787c6cd55f29d43465de621778221e0fc46e (diff) | |
download | cpython-885d457709c1d680c899dc3d035a47c8fb514cfa.zip cpython-885d457709c1d680c899dc3d035a47c8fb514cfa.tar.gz cpython-885d457709c1d680c899dc3d035a47c8fb514cfa.tar.bz2 |
sprintf -> PyOS_snprintf in some "obviously safe" cases.
Also changed <>-style #includes to ""-style in some places where the
former didn't make sense.
Diffstat (limited to 'Modules/_hotshot.c')
-rw-r--r-- | Modules/_hotshot.c | 16 |
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 |