From: Guido van Rossum Date: Sat, 27 Jul 1991 21:34:00 +0000 (+0000) Subject: Support for long integers X-Git-Tag: v0.9.8~867 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76a00af3f2727df350c12d3110cddbb6be8c8a1f;p=thirdparty%2FPython%2Fcpython.git Support for long integers --- diff --git a/Modules/cgensupport.c b/Modules/cgensupport.c index 8d20f020bcc6..9a33eb96eac7 100644 --- a/Modules/cgensupport.c +++ b/Modules/cgensupport.c @@ -24,21 +24,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Functions used by cgen output */ -#include - -#include "PROTO.h" -#include "object.h" -#include "intobject.h" -#include "floatobject.h" -#include "stringobject.h" -#include "tupleobject.h" -#include "listobject.h" -#include "methodobject.h" -#include "moduleobject.h" -#include "modsupport.h" -#include "import.h" +#include "allobjects.h" #include "cgensupport.h" -#include "errors.h" /* Functions to construct return values */ @@ -130,6 +117,10 @@ extractdouble(v, p_arg) *p_arg = GETINTVALUE((intobject *)v); return 1; } + else if (is_longobject(v)) { + *p_arg = dgetlongvalue(v); + return 1; + } return err_badarg(); } @@ -149,6 +140,10 @@ extractfloat(v, p_arg) *p_arg = GETINTVALUE((intobject *)v); return 1; } + else if (is_longobject(v)) { + *p_arg = dgetlongvalue(v); + return 1; + } return err_badarg(); } diff --git a/Python/cgensupport.c b/Python/cgensupport.c index 8d20f020bcc6..9a33eb96eac7 100644 --- a/Python/cgensupport.c +++ b/Python/cgensupport.c @@ -24,21 +24,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Functions used by cgen output */ -#include - -#include "PROTO.h" -#include "object.h" -#include "intobject.h" -#include "floatobject.h" -#include "stringobject.h" -#include "tupleobject.h" -#include "listobject.h" -#include "methodobject.h" -#include "moduleobject.h" -#include "modsupport.h" -#include "import.h" +#include "allobjects.h" #include "cgensupport.h" -#include "errors.h" /* Functions to construct return values */ @@ -130,6 +117,10 @@ extractdouble(v, p_arg) *p_arg = GETINTVALUE((intobject *)v); return 1; } + else if (is_longobject(v)) { + *p_arg = dgetlongvalue(v); + return 1; + } return err_badarg(); } @@ -149,6 +140,10 @@ extractfloat(v, p_arg) *p_arg = GETINTVALUE((intobject *)v); return 1; } + else if (is_longobject(v)) { + *p_arg = dgetlongvalue(v); + return 1; + } return err_badarg(); }