Git Product home page Git Product logo

Comments (5)

RyanGlScott avatar RyanGlScott commented on August 15, 2024

Better yet, why not just use #alignment LASTINPUTINFO to compute its alignment directly?

from win32.

AndreasPK avatar AndreasPK commented on August 15, 2024

Better yet, why not just use #alignment LASTINPUTINFO to compute its alignment directly?

I read some comment of that being only supported by "somewhat" recent versions. But depending on the version constraints that should work as well I guess.

from win32.

RyanGlScott avatar RyanGlScott commented on August 15, 2024

#alignment works out of the box on GHC 8.0 or later, but it's straightforward to backport to older GHCs with enough CPP. In fact, Win32 already does this—see alignment.h:

#if __GLASGOW_HASKELL__ < 711
#define hsc_alignment(t ) hsc_printf ( "%lu", (unsigned long)offsetof(struct {char x__; t(y__); }, y__));
#endif

As long as you #include "alignment.h", all should be well.

from win32.

Mistuke avatar Mistuke commented on August 15, 2024

Indeed, we should use #alignment here, Thanks for spotting this.. these modules came from an import of win32-extras and I thought I had gotten all the shady alignments.. but clearly missed one.

I'll go over the Storable instances again and double check them.

from win32.

Mistuke avatar Mistuke commented on August 15, 2024

Fixed, thanks for the report.

from win32.

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.