Staging
v0.5.1
https://github.com/python/cpython
Revision dfdac1af4d323f4f69775794777197ea31d804ef authored by Barry Warsaw on 23 March 2001, 16:13:30 UTC, committed by Barry Warsaw on 23 March 2001, 16:13:30 UTC
#403666.  Specifically,

In codestr, force `c' to be global.  It's unclear what the semantics
should be for a code object compiled at module scope, but bound and
run in a function.  In CPython, `c' is global (by accident?) while in
Jython, `c' is local.  The intent of the test clearly is to make `c'
global, so let's be explicit about it.

Jython also does not have a __builtins__ name in the module's
namespace, so we use a more portable alternative (though I'm not sure
why the test requires "__builtins__" in the g namespace).

Finally, skip the new.code() test if the new module doesn't have a
`code' attribute.  Jython will never have this.
1 parent 101651c
Raw File
Tip revision: dfdac1af4d323f4f69775794777197ea31d804ef authored by Barry Warsaw on 23 March 2001, 16:13:30 UTC
Several changes for Jython portability. This closes SF patch
Tip revision: dfdac1a
gdbinit
# -*- ksh -*-
#
# If you use the GNU debugger gdb to debug the Python C runtime, you
# might find some of the following commands useful.  Copy this to your
# ~/.gdbinit file and it'll get loaded into gdb automatically when you
# start it up.  Then, at the gdb prompt you can do things like:
#
#    (gdb) pyo apyobjectptr
#    <module 'foobar' (built-in)>
#    refcounts: 1
#    address    : 84a7a2c
#    $1 = void
#    (gdb)

# Prints a representation of the object to stderr, along with the
# number of reference counts it current has and the hex address the
# object is allocated at.  The argument must be a PyObject*
define pyo
print _PyObject_Dump($arg0)
end

# Prints a representation of the object to stderr, along with the
# number of reference counts it current has and the hex address the
# object is allocated at.  The argument must be a PyGC_Head*
define pyg
print _PyGC_Dump($arg0)
end
back to top