mirror of
https://github.com/python/cpython.git
synced 2026-05-25 20:02:08 +00:00
The common technique for printing out a pointer has been to cast to a long and use the "%lx" printf modifier. This is incorrect on Win64 where casting to a long truncates the pointer. The "%p" formatter should be used instead. The problem as stated by Tim: > Unfortunately, the C committee refused to define what %p conversion "looks > like" -- they explicitly allowed it to be implementation-defined. Older > versions of Microsoft C even stuck a colon in the middle of the address (in > the days of segment+offset addressing)! The result is that the hex value of a pointer will maybe/maybe not have a 0x prepended to it. Notes on the patch: There are two main classes of changes: - in the various repr() functions that print out pointers - debugging printf's in the various thread_*.h files (these are why the patch is large) Closes SourceForge patch #100505. |
||
|---|---|---|
| .. | ||
| .cvsignore | ||
| atof.c | ||
| bltinmodule.c | ||
| ceval.c | ||
| codecs.c | ||
| compile.c | ||
| dup2.c | ||
| dynload_aix.c | ||
| dynload_beos.c | ||
| dynload_dl.c | ||
| dynload_hpux.c | ||
| dynload_mac.c | ||
| dynload_next.c | ||
| dynload_os2.c | ||
| dynload_shlib.c | ||
| dynload_stub.c | ||
| dynload_win.c | ||
| errors.c | ||
| exceptions.c | ||
| fmod.c | ||
| frozen.c | ||
| frozenmain.c | ||
| getargs.c | ||
| getcompiler.c | ||
| getcopyright.c | ||
| getcwd.c | ||
| getmtime.c | ||
| getopt.c | ||
| getplatform.c | ||
| getversion.c | ||
| graminit.c | ||
| hypot.c | ||
| import.c | ||
| importdl.c | ||
| importdl.h | ||
| Makefile.in | ||
| marshal.c | ||
| memmove.c | ||
| modsupport.c | ||
| mystrtoul.c | ||
| pyfpe.c | ||
| pystate.c | ||
| pythonmain.c | ||
| pythonrun.c | ||
| sigcheck.c | ||
| strdup.c | ||
| strerror.c | ||
| strtod.c | ||
| structmember.c | ||
| sysmodule.c | ||
| thread.c | ||
| thread_beos.h | ||
| thread_cthread.h | ||
| thread_foobar.h | ||
| thread_lwp.h | ||
| thread_nt.h | ||
| thread_os2.h | ||
| thread_pth.h | ||
| thread_pthread.h | ||
| thread_sgi.h | ||
| thread_solaris.h | ||
| thread_wince.h | ||
| traceback.c | ||