[Python-Dev] Suggestion/ feature request

"Martin v. Löwis" martin at v.loewis.de
Tue Nov 21 21:01:35 CET 2006


Julian schrieb:
> I have two questions though... Is there any reason why Python is defining
> them to 1?

No particular reason, except that it's C tradition to give macros a
value of 1 when you define them.

> And then later on in the same file:
> /* Turn off warnings about deprecated C runtime functions in 
>    VisualStudio .NET 2005 */
> #if _MSC_VER >= 1400 && !defined _CRT_SECURE_NO_DEPRECATE
> #define _CRT_SECURE_NO_DEPRECATE
> #endif
> 
> Isn't that redundant? 

It is indeed.

> I don't think that second block will ever get
> executed. Moreover, in the second block, it is not being defined to 1. why
> is that ?

Different people have contributed this; the first one came from

r41563 | martin.v.loewis | 2005-11-29 18:09:13 +0100 (Di, 29 Nov 2005)

Silence VS2005 warnings about deprecated functions.

and the second one from

r46778 | kristjan.jonsson | 2006-06-09 18:28:01 +0200 (Fr, 09 Jun 2006)
| 2 lines

Turn off warning about deprecated CRT functions on for VisualStudio .NET
2005.
Make the definition #ARRAYSIZE conditional.  VisualStudio .NET 2005
already has it defined using a better gimmick.

Regards,
Martin


More information about the Python-Dev mailing list