mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Patches from Greg Stein to support 'P' format in struct module's
native format, as void* (translated to Python int or long). Also adds PyLong_FromVoidPtr and PyLong_AsVoidPtr to longobject.c.
This commit is contained in:
parent
43b655c0ab
commit
78694d970f
5 changed files with 96 additions and 0 deletions
|
@ -213,6 +213,12 @@ typedef int pid_t;
|
|||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
#ifdef _M_ALPHA
|
||||
#define SIZEOF_VOID_P 8
|
||||
#else
|
||||
#define SIZEOF_VOID_P 4
|
||||
#endif
|
||||
|
||||
/* EXPERIMENTAL FEATURE: When CHECK_IMPORT_CASE is defined, check case of
|
||||
imported modules against case of file; this causes "import String" to fail
|
||||
with a NameError exception when it finds "string.py". Normally, you set
|
||||
|
|
|
@ -215,12 +215,14 @@ EXPORTS
|
|||
PyLong_AsLongLong
|
||||
PyLong_AsUnsignedLong
|
||||
PyLong_AsUnsignedLongLong
|
||||
PyLong_AsVoidPtr
|
||||
PyLong_FromDouble
|
||||
PyLong_FromLong
|
||||
PyLong_FromLongLong
|
||||
PyLong_FromString
|
||||
PyLong_FromUnsignedLong
|
||||
PyLong_FromUnsignedLongLong
|
||||
PyLong_FromVoidPtr
|
||||
PyMapping_Check
|
||||
PyMapping_GetItemString
|
||||
PyMapping_HasKey
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue