| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The code is based on strncmp() of the libiberty library,
function in the public domain.
|
|
|
|
|
| |
Write a message formatted by PyUnicode_FromFormatV() to sys.stdout and
sys.stderr.
|
|
|
|
|
|
| |
Call _wfopen() on Windows, or fopen() otherwise. Return the new file object on
success, or NULL if the file cannot be open or (if PyErr_Occurred()) on unicode
error.
|
|
|
|
| |
Use stat() or _wstat() depending on the OS.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's a ParseTuple converter: decode bytes objects to unicode using
PyUnicode_DecodeFSDefaultAndSize(); str objects are output as-is.
* Don't specify surrogateescape error handler in the comments nor the
documentation, but PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_EncodeFSDefault() because these functions use strict error handler
for the mbcs encoding (on Windows).
* Remove PyUnicode_FSConverter() comment in unicodeobject.c to avoid
inconsistency with unicodeobject.h.
|
|
|
|
|
| |
* Use _Py_wchar2char() in _wstat() and _Py_wfopen()
* Document _Py_char2wchar()
|
|
|
|
|
| |
at interpreter startup before importing any non-builtin modules.
Should fix #9589.
|
| |
|
|
|
|
|
|
|
| |
Similar to PyErr_WarnEx() but use PyUnicode_FromFormatV() to format the warning
message.
Strip also some trailing spaces.
|
|
|
|
|
| |
va_copy, but available on all python platforms. Untabified a few
unrelated files.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
exposed in Python.h. This function is similar to POSIX
gettimeofday(struct timeval *tp), but available on platforms without
gettimeofday().
|
|
|
|
| |
(And similarly for complex numbers.)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
signed/unsigned chars or on integers directly derived from those. In all
cases, it could be replaced by a simple cast to (unsigned char). Reasons
for the change:
a) Make the comment more explicit.
b) If char is unsigned, the cast is optimized away.
c) If char is unsigned, gcc emits spurious "array subscript
has type 'char'" warnings.
|
|
|
|
| |
This fixes #8413.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix the encoding of the modules filename.
Reindent also traceback.h, just because I hate tabs :-)
|
| |
|
|
|
|
| |
for use by the datetime module; also refactor long_round to use this function.
|
|
|
|
|
|
| |
(instances of int, float, complex, decimal.Decimal and
fractions.Fraction) that makes it easy to maintain the invariant that
hash(x) == hash(y) whenever x and y have equal value.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81398 | antoine.pitrou | 2010-05-21 19:12:38 +0200 (ven., 21 mai 2010) | 6 lines
Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows
embedders of the interpreter to set sys.argv without also modifying
sys.path. This helps fix `CVE-2008-5983
<http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
........
|
|
|
|
|
| |
encoding and surrogateespace error handler instead of the locale encoding to be
consistent with os.environ. Add PySys_AddWarnOptionUnicode() function.
|
| |
|
|
|
|
|
|
| |
object to Py_FileSystemDefaultEncoding with the "surrogateescape" error
handler, return a bytes object. If Py_FileSystemDefaultEncoding is not set,
fall back to UTF-8.
|
|
|
|
|
|
|
|
|
|
| |
* Add paragraph titles to c-api/unicode.rst.
* Fix PyUnicode_DecodeFSDefault*() comment: it now uses the "surrogateescape"
error handler (and not "replace")
* Remove "The function is intended to be used for paths and file names only
during bootstrapping process where the codecs are not set up." from
PyUnicode_FSConverter() comment: it is used after the bootstrapping and for
other purposes than file names
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://code.google.com/p/data-race-test/wiki/ThreadSanitizer is a dynamic data
race detector that runs on top of valgrind. With this patch, the binaries at
http://code.google.com/p/data-race-test/wiki/ThreadSanitizer#Binaries pass many
but not all of the Python tests. All of regrtest still passes outside of tsan.
I've implemented part of the C1x atomic types so that we can explicitly mark
variables that are used across threads, and get defined behavior as compilers
advance.
I've added tsan's client header and implementation to the codebase in
dynamic_annotations.{h,c} (docs at
http://code.google.com/p/data-race-test/wiki/DynamicAnnotations).
Unfortunately, I haven't been able to get helgrind and drd to give sensible
error messages, even when I use their client annotations, so I'm not supporting
them.
|
|
|
|
|
| |
This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments
are all strings, using an optimized method if possible.
|
|
|
|
| |
you have to convert your bytearray filenames to bytes
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80178 | ronald.oussoren | 2010-04-18 15:47:49 +0200 (Sun, 18 Apr 2010) | 2 lines
Fix for issue #7072
........
|
|
|
|
|
|
|
| |
This fixes issue #8441: python.c is not included
in the framework while main.c is and without this
patch you get a link error when building
Python.framework on OSX.
|
| |
|
| |
|
|
|
|
|
|
| |
module now takes an optional timeout argument in seconds. Timeout support
relies on the system threading library, so as to avoid a semi-busy wait
loop.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79555 | antoine.pitrou | 2010-04-01 18:42:11 +0200 (jeu., 01 avril 2010) | 5 lines
Issue #8276: PyEval_CallObject() is now only available in macro form. The
function declaration, which was kept for backwards compatibility reasons,
is now removed (the macro was introduced in 1997!).
........
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79060 | collin.winter | 2010-03-18 14:54:01 -0700 (Thu, 18 Mar 2010) | 4 lines
Add support for weak references to code objects. This will be used by an optimization in the incoming Python 3 JIT.
Patch by Reid Kleckner!
........
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX systems with a C extension module. This is required in order for
the subprocess module to be made thread safe.
The pure python implementation is retained so that it can continue to be
used if for some reason the _posixsubprocess extension module is not
available.
The unittest executes tests on both code paths to guarantee compatibility.
* Moves PyLong_FromPid and PyLong_AsPid from posixmodule.c into longobject.h.
Code reviewed by jeffrey.yasskin at http://codereview.appspot.com/223077/show
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78638 | victor.stinner | 2010-03-04 00:20:25 +0100 (jeu., 04 mars 2010) | 3 lines
Issue #7544: Preallocate thread memory before creating the thread to avoid a
fatal error in low memory condition.
........
|