Menu

#1 if long fits into integer return as int

closed
nobody
None
5
2002-03-01
2002-02-26
No

Hi,

I'm using kinterbase with zope. In this context I need
an integer in the database returned as Py_int and not
as Py_long. With long datatype the tree in zope will
not work
correctly. This problem is known from gvib.

I fixed the current version of kinterbase to return the
value properly.

see attached file ;-)

Discussion

  • Maik Wojcieszak

    Maik Wojcieszak - 2002-02-26

    changed version for zope da

     
  • David S. Rushby

    David S. Rushby - 2002-03-01

    Logged In: YES
    user_id=414645

    Hi, Maik... me again.

    Several days ago I rewrote some of the numeric conversion
    code in response to bug report #522774. I finished
    rewriting that code on 28 Feb, when I integrated my fix for
    #517093.

    As a result, the current CVS version of kinterbasdb.c
    always returns a Python integer when the raw value is a non-
    fractional SQL_LONG. Python integers are really C longs
    under the hood, so checking against INT_MIN and INT_MAX to
    decide whether to return a Python int or Python long is not
    necessary.

    Just as in the case of the blob memory leak bug, I happened
    to satisfy your request a few days before you reported it--
    while fixing a totally separate bug. Do you have anything
    else you'd like me to fix before you ask (wink)?

    Hey, thanks for taking the time to make bug reports and
    feature requests.

     
  • David S. Rushby

    David S. Rushby - 2002-03-01
    • status: open --> closed
     

Log in to post a comment.

Auth0 Logo