summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-09-18 14:14:13 +0000
committerGuido van Rossum <guido@python.org>1998-09-18 14:14:13 +0000
commitc267e9f9dd2f51941106ed4d5e9ca15b3dea545a (patch)
tree920029f938041855bea77f13b42db2e4b7fc4364 /PC
parenta178392b27a0c747daf1e549f2264d3db8789978 (diff)
downloadcpython-c267e9f9dd2f51941106ed4d5e9ca15b3dea545a.tar.gz
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.
Diffstat (limited to 'PC')
-rw-r--r--PC/config.h6
-rw-r--r--PC/python_nt.def2
2 files changed, 8 insertions, 0 deletions
diff --git a/PC/config.h b/PC/config.h
index b043df530b..0818746e54 100644
--- a/PC/config.h
+++ b/PC/config.h
@@ -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
diff --git a/PC/python_nt.def b/PC/python_nt.def
index 323a935ea2..f56ec66a71 100644
--- a/PC/python_nt.def
+++ b/PC/python_nt.def
@@ -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