diff options
author | Guido van Rossum <guido@python.org> | 1998-08-25 16:07:15 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-08-25 16:07:15 (GMT) |
commit | 3293b07df58a875afaf3fc82c1e499af59bc99e4 (patch) | |
tree | 8f72dc01a6d24e4df800dddd1d406e966c4ea61d /Python | |
parent | 859b407cf12b0bcf6d7d56e48df765664e41e82b (diff) | |
download | cpython-3293b07df58a875afaf3fc82c1e499af59bc99e4.zip cpython-3293b07df58a875afaf3fc82c1e499af59bc99e4.tar.gz cpython-3293b07df58a875afaf3fc82c1e499af59bc99e4.tar.bz2 |
Patch by Mark Hammond to support 64-bit ints on MS platforms.
The MS compiler doesn't call it 'long long', it uses __int64,
so a new #define, LONG_LONG, has been added and all occurrences
of 'long long' are replaced with it.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/getargs.c | 12 | ||||
-rw-r--r-- | Python/modsupport.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 34e3a5c..86fd471 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -500,11 +500,11 @@ convertsimple1(arg, p_format, p_va) } #if HAVE_LONG_LONG - case 'L': /* 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() ) { + 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; @@ -1003,9 +1003,9 @@ skipitem(p_format, p_va) } #if HAVE_LONG_LONG - case 'L': /* long long int */ + case 'L': /* LONG_LONG int */ { - (void) va_arg(*p_va, long long *); + (void) va_arg(*p_va, LONG_LONG *); break; } #endif diff --git a/Python/modsupport.c b/Python/modsupport.c index 7e1acab..6066aa8 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -293,7 +293,7 @@ do_mkvalue(p_format, p_va) #if HAVE_LONG_LONG case 'L': - return PyLong_FromLongLong((long long)va_arg(*p_va, long long)); + return PyLong_FromLongLong((LONG_LONG)va_arg(*p_va, LONG_LONG)); #endif case 'f': |