summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-08-04 22:46:29 (GMT)
committerGuido van Rossum <guido@python.org>1998-08-04 22:46:29 (GMT)
commit1a8791e0b875df8e9428c2d9969f64e5967ac0b4 (patch)
tree4c0a38c8dbfc45a9b2d7343c17c4a969a8718162 /Python/getargs.c
parent7d896ab1bbd5e15be7ae9203ead47f4f500a6a81 (diff)
downloadcpython-1a8791e0b875df8e9428c2d9969f64e5967ac0b4.zip
cpython-1a8791e0b875df8e9428c2d9969f64e5967ac0b4.tar.gz
cpython-1a8791e0b875df8e9428c2d9969f64e5967ac0b4.tar.bz2
Changes for BeOS, QNX and long long, by Chris Herborth.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r--Python/getargs.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index e4c2634..34e3a5c 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -499,6 +499,20 @@ convertsimple1(arg, p_format, p_va)
break;
}
+#if HAVE_LONG_LONG
+ case 'L': /* long long */
+ {
+ long long *p = va_arg( *p_va, long long * );
+ long long ival = PyLong_AsLongLong( arg );
+ if( ival == (long long)-1 && PyErr_Occurred() ) {
+ return "long<L>";
+ } else {
+ *p = ival;
+ }
+ break;
+ }
+#endif
+
case 'f': /* float */
{
float *p = va_arg(*p_va, float *);
@@ -988,6 +1002,14 @@ skipitem(p_format, p_va)
break;
}
+#if HAVE_LONG_LONG
+ case 'L': /* long long int */
+ {
+ (void) va_arg(*p_va, long long *);
+ break;
+ }
+#endif
+
case 'f': /* float */
{
(void) va_arg(*p_va, float *);