A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-July/016488.html below:

[Python-Dev] PyOS_snprintf()

[Python-Dev] PyOS_snprintf() / PyOS_vsnprintf() [Python-Dev] PyOS_snprintf() / PyOS_vsnprintf()Guido van Rossum guido@zope.com
Tue, 31 Jul 2001 12:56:51 -0400
> While working on the warning patch for modsupport.c,
> I've added two new APIs which hopefully make it easier for Python
> to switch to buffer overflow safe [v]snprintf() APIs for error
> reporting et al. 
> 
> The two new APIs are PyOS_snprintf() and 
> PyOS_vsnprintf() and work just like the standard ones in many
> C libs. On platforms which have snprintf(), the native APIs are used,
> on all other an emulation with snprintf() tries to do its best.
> 
> Please try them out on your platform. If all goes well, I think
> we should replace all sprintf() (without the n in the name)
> with these new safer APIs.

It would be easier to test out the fallback implementation if there
was a config option to enable it even on platforms that do have the
native version.

Or maybe (following the getopt example) we might consider always using
our own code -- so it gets the maximum testing.

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4