Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision 49cedc51a68b4cd2525c14ab02bd1a483d8be389 authored by Victor Stinner on 06 December 2018, 10:56:00 UTC, committed by GitHub on 06 December 2018, 10:56:00 UTC
Define _CRT_SECURE_NO_WARNINGS in the Visual Studio pythoncore project to make quiet security warnings when building zlib C files (Modules\zlib\ subdirectory).
1 parent 29a4cbf
Tip revision: 49cedc51a68b4cd2525c14ab02bd1a483d8be389 authored by Victor Stinner on 06 December 2018, 10:56:00 UTC
bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project (GH-10819)
bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project (GH-10819)
Tip revision: 49cedc5
timingmodule.c
/*
* Author: George V. Neville-Neil
*/
#include "Python.h"
/* Our stuff... */
#include "timing.h"
static PyObject *
start_timing(PyObject *self)
{
Py_INCREF(Py_None);
BEGINTIMING;
return Py_None;
}
static PyObject *
finish_timing(PyObject *self)
{
ENDTIMING
Py_INCREF(Py_None);
return Py_None;
}
static PyObject *
seconds(PyObject *self)
{
return PyInt_FromLong(TIMINGS);
}
static PyObject *
milli(PyObject *self)
{
return PyInt_FromLong(TIMINGMS);
}
static PyObject *
micro(PyObject *self)
{
return PyInt_FromLong(TIMINGUS);
}
static PyMethodDef timing_methods[] = {
{"start", (PyCFunction)start_timing, METH_NOARGS},
{"finish", (PyCFunction)finish_timing, METH_NOARGS},
{"seconds", (PyCFunction)seconds, METH_NOARGS},
{"milli", (PyCFunction)milli, METH_NOARGS},
{"micro", (PyCFunction)micro, METH_NOARGS},
{NULL, NULL}
};
PyMODINIT_FUNC inittiming(void)
{
if (PyErr_WarnPy3k("the timing module has been removed in "
"Python 3.0; use time.clock() instead", 2) < 0)
return;
(void)Py_InitModule("timing", timing_methods);
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...