">

(original) (raw)

Hello there.

I‘m working on getting the 64 bit build of the trunk pass the testsuite.

Here is one snag, that you could help me fix.

 

In test\_getargs2(), there is at line 190: self.failUnlessEqual(99, getargs\_n(Long()))

Now, the Long class has a \_\_int\_\_ method which returns 99L.

 

However, we run into trouble here:

intobject.c:210

����� if ((nb = op->ob\_type->tp\_as\_number) == NULL ||

����� ��� (nb->nb\_int == NULL && nb->nb\_long == 0)) {

����������� PyErr\_SetString(PyExc\_TypeError, "an integer is required");

����������� return -1;

����� }

 

����� if (nb->nb\_long != 0) {

����������� io = (PyIntObject\*) (\*nb->nb\_long) (op);

����� } else {

����������� io = (PyIntObject\*) (\*nb->nb\_int) (op);

����� }

 

trouble here

The trouble is that nb->nb\_long is non zero, but when called, it returns an attribute error, since \_\_long\_\_ is missing.

nb\_long points to instance\_long.

 

Now, how to fix this?� Should the code in intobject.c catch the AttributeError, maybe, and continue to the nb\_int?

 

Cheers,

Kristj�n