Staging
v0.5.1
https://github.com/python/cpython
Revision 165e797817b9bc1237a694790142f6eb97fdf31d authored by Andrew M. Kuchling on 05 October 2006, 17:22:15 UTC, committed by Andrew M. Kuchling on 05 October 2006, 17:22:15 UTC
Move the assert which checks for a NULL pointer first.
Klocwork #274.
1 parent fb36924
Raw File
Tip revision: 165e797817b9bc1237a694790142f6eb97fdf31d authored by Andrew M. Kuchling on 05 October 2006, 17:22:15 UTC
[Backport r51224 | neal.norwitz]
Tip revision: 165e797
getbuildinfo.c
#include "Python.h"

#ifndef DONT_HAVE_STDIO_H
#include <stdio.h>
#endif

#ifndef DATE
#ifdef __DATE__
#define DATE __DATE__
#else
#define DATE "xx/xx/xx"
#endif
#endif

#ifndef TIME
#ifdef __TIME__
#define TIME __TIME__
#else
#define TIME "xx:xx:xx"
#endif
#endif

#ifndef BUILD
#define BUILD 0
#endif

const char *
Py_GetBuildInfo(void)
{
	static char buildinfo[50];
	PyOS_snprintf(buildinfo, sizeof(buildinfo),
		      "#%d, %.20s, %.9s", BUILD, DATE, TIME);
	return buildinfo;
}
back to top