Git Product home page Git Product logo

Comments (8)

nurpax avatar nurpax commented on July 28, 2024

What is the specific problem? Based on http://www.sqlite.org/c3ref/int64.html, it looks like the only way sqlite3_int64 could be less than 64-bits would be if someone would #define SQLITE_INT64_TYPE to be a type with less than 64-bits (ie. force the build to use something else than 64-bit default types). Why would anyone do that? This doesn't seem like something we should try to defend ourselves against.

from direct-sqlite.

 avatar commented on July 28, 2024

If SQLITE_INT64_TYPE is not defined, sqlite3_int64 defaults to long
long it. Do you think direct-sqlite will ever run in a platform where
long long int is more than 64 bits (say, 128 bits)? If not, this is
not an issue.

2013/9/14, Janne Hellsten [email protected]:

What is the specific problem? Based on
http://www.sqlite.org/c3ref/int64.html, it looks like the only way
sqlite3_int64 could be less than 64-bits would be if someone would #define
SQLITE_INT64_TYPE to be a type with less than 64-bits (ie. force the build
to use something else than 64-bit default types). Why would anyone do that?
This doesn't seem like something we should try to defend ourselves
against.


Reply to this email directly or view it on GitHub:
#34 (comment)

from direct-sqlite.

nurpax avatar nurpax commented on July 28, 2024

I think you will have a hard time finding a platform where long long is larger than 64-bits. I think the SQLite defaults work just fine on platforms that support Haskell. I vote for closing this as not a bug.

from direct-sqlite.

 avatar commented on July 28, 2024

Sure. I did find a message in a gcc c++ header saying "assume long
long no bigger than __int128". However, I could not find any platform,
supported by Haskell or not, where long long is supposed to be bigger
than 64 bits. There are even platforms where sqlite3 defines double as
integer. If you think it's paranoid to check for all these things, I
can't disagree.

2013/9/15, Janne Hellsten [email protected]:

I think you will have a hard time finding a platform where long long is
larger than 64-bits. I think the SQLite defaults work just fine on
platforms that support Haskell. I vote for closing this as not a bug.


Reply to this email directly or view it on GitHub:
#34 (comment)

from direct-sqlite.

nurpax avatar nurpax commented on July 28, 2024

I maintain that this should be closed as not a bug. If it happens that a platform with > 64-bits comes around (w/ long long != 64-bits), I'm sure the SQLite header with these typedefs will be fixed accordingly. Anyhow, if you're really interested in pursuing this (IMO theoretical) possibility further, perhaps take it up with the upstream SQLite project?

from direct-sqlite.

 avatar commented on July 28, 2024

I agree, of course. Just close this as not a bug. If I ever find a
platform where this is a problem, the upstream sqlite code is what
should be updated. Thanks.

2013/9/16, Janne Hellsten [email protected]:

I maintain that this should be closed as not a bug. If it happens that a
platform with > 64-bits comes around (w/ long long != 64-bits), I'm sure the
SQLite header with these typedefs will be fixed accordingly. Anyhow, if
you're really interested in pursuing this (IMO theoretical) possibility
further, perhaps take it up with the upstream SQLite project?


Reply to this email directly or view it on GitHub:
#34 (comment)

from direct-sqlite.

nurpax avatar nurpax commented on July 28, 2024

I think only @IreneKnapp (the author) or you can close this. :)

from direct-sqlite.

IreneKnapp avatar IreneKnapp commented on July 28, 2024

Not a bug. Thank you all for the report and productive discussion, though!

from direct-sqlite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.