| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
number of references on all Python objects. This is only enabled when Py_TRACE_REFS is defined (which includes default debug builds under Windows).
Also removed a redundant cast from sys.getrefcount(), as discussed on the patches list.
|
|
|
|
|
|
| |
Changed the API names for setting the default encoding.
These are now in line with the other hooks API names
(no underscores).
|
|
|
|
|
|
| |
Added APIs to allow setting and querying the system's
current string encoding: sys.set_string_encoding()
and sys.get_string_encoding().
|
|
|
|
| |
suggestion from Greg Stein.
|
|
|
|
|
|
| |
major, minor, micro, level, serial
Values are now monotonically increasing with each new release.
|
|
|
|
|
|
| |
is a string "a2", "b1", "c1", or '' for a final release.
Added version_info and hexversion to the module docstring.
|
|
|
|
| |
(Mostly.)
|
|
|
|
| |
PyArg_ParseTuple() format string arguments as possible.
|
|
|
|
|
|
| |
NULL. In that case, return NULL rather than dumping core.
This fixes PR#91, submitted by Lele Gaifax.
|
|
|
|
| |
sys.version was missing a Py_XDECREF().
|
|
|
|
| |
1.5. Omit the second part.
|
|
|
|
|
|
| |
In other words, hex(sys.hexversion) == 0x010502b2 for Python 1.5.2b2.
This is derived from the new variable PY_VERSION_HEX defined in patchlevel.h.
(Cute, eh?)
|
|
|
|
| |
reliably; check return value of vsprintf().
|
|
|
|
|
| |
However two string literals concatenated are fine!
Hope this doesn't break other platforms.
|
|
|
|
| |
long, but it sure helps!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adapted from code submitted by Just van Rossum.
PySys_WriteStdout(format, ...)
PySys_WriteStderr(format, ...)
The first function writes to sys.stdout; the second to sys.stderr. When
there is a problem, they write to the real (C level) stdout or stderr;
no exceptions are raised (but a pending exception may be cleared when a
new exception is caught).
Both take a printf-style format string as their first argument followed
by a variable length argument list determined by the format string.
*** WARNING ***
The format should limit the total size of the formatted output string to
1000 bytes. In particular, this means that no unrestricted "%s" formats
should occur; these should be limited using "%.<N>s where <N> is a
decimal number calculated so that <N> plus the maximum size of other
formatted text does not exceed 1000 bytes. Also watch out for "%f",
which can print hundreds of digits for very large numbers.
|
|
|
|
| |
__stderr__. These will be used by the import cleanup.
|
|
|
|
|
| |
that should be PyImport_Inittab (a new pointer initialized to point to
the array).
|
| |
|
| |
|
|
|
|
|
|
|
| |
Everything should now work again.
See the comments for the .h files mass checkin (e.g. pystate.h) for
more detail.
|
|
|
|
| |
properly declared in Python.h.
|
| |
|
| |
|
|
|
|
|
| |
All per-thread globals are moved into a struct which is manipulated
separately.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dirname in sys.path. This means that you can create a symbolic link
foo in /usr/local/bin pointing to /usr/yourname/src/foo/foo.py, and
then invoking foo will insert /usr/yourname/src/foo in sys.path, not
/usr/local/bin. This makes it easier to have multifile programs
(before, the program would have to do an os.readlink(sys.argv[0])
itself and insert the resulting directory in sys.path -- Grail does
this).
Note that the expansion is only used for sys.path; sys.argv[0] is
still the original, unadorned filename (/usr/local/bin/foo in the
example).
|
|
|
|
| |
in ceval.c).
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Test for / as well as for SEP for MS filenames.
Drop trailing separator from sys.path[0] for MS and Unix filenames.
|
| |
|
|
|
|
|
| |
sys.argv, insert "". Note that "." is removed as a default component
of the path (see changes to getpath.c and Setup.in).
|
|
|
|
|
|
| |
directory containing argv[0] is inserted in front of sys.path.
If argv[0] contains no directory, an empty string is inserted.
If argv is empty, nothing happens.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
getcounts() returns a list of counts of allocations and
deallocations for all different object types.
getobjects(n [, type ]) returns a list of recently allocated
and not-yet-freed objects of the given type (all
objects if no type given). Only the n most recent
(all if n==0) objects are returned.
getcounts is only available if compiled with -DCOUNT_ALLOCS,
getobjects is only available if compiled with -DTRACE_REFS. Note that
everything must be compiled with these options!
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
bltinmodule.c: fixed coerce() nightmare in ternary pow().
modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject().
pythonrun.c: move flushline() into and around print_error().
|
|
|
|
|
|
| |
err_fetch/err_restore and so on). But...
NOTE: import.c has been rewritten and all the DL stuff is now in the
new file importdl.c.
|