[New-bugs-announce] [issue1508] Removal of stale code in _csv.c / pyexpat.c

Joseph Armbruster report at bugs.python.org
Wed Nov 28 00:09:58 CET 2007


New submission from Joseph Armbruster:

I found two code blocks that look as if they can be safely removed:


>From _csv.c:

/* begin 2.2 compatibility macros */
#ifndef PyDoc_STRVAR
/* Define macros for inline documentation. */
#define PyDoc_VAR(name) static char name[]
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
#ifdef WITH_DOC_STRINGS
#define PyDoc_STR(str) str
#else
#define PyDoc_STR(str) ""
#endif
#endif /* ifndef PyDoc_STRVAR */


>From pyexpat.c:

#ifndef PyDoc_STRVAR

/*
 * fdrake says:
 * Don't change the PyDoc_STR macro definition to (str), because
 * '''the parentheses cause compile failures
 * ("non-constant static initializer" or something like that)
 * on some platforms (Irix?)'''
 */
#define PyDoc_STR(str)         str
#define PyDoc_VAR(name)        static char name[]
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
#endif

----------
components: Extension Modules
messages: 57895
nosy: JosephArmbruster
severity: minor
status: open
title: Removal of stale code in _csv.c / pyexpat.c
versions: Python 3.0

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1508>
__________________________________


More information about the New-bugs-announce mailing list