Coder Social home page Coder Social logo

Comments (3)

mosra avatar mosra commented on May 24, 2024

Yep, this bothers me as well πŸ˜…

Oh, it's __declspec(restrict)? Then it should be fine to put that there. I can't read, I thought it was __declspec(dllimport) and such, meaning I'd have to do detection whether static or dynamic runtime is used, using the right flag, inevitably running into more problems...

I have a rule to never include anything from Windows in any public header, because then, if your project doesn't define all the NOMINMAX, LEAN_MEAN_LEAN_EXTRA_LEAN_MEAN etc macro, you get stuff like #define interface struct and it's not great. X11 includes are the same, also banned from public headers. An alternative solution I was considering was to add Memory.cpp and chuck the #include <malloc.h> in there, but since that's one more indirection and exported symbol I'm not so sure about the tradeoff.

Actually, let me first check what <malloc.h> has on Windows. Since I don't see a "sanitized" version of this header in https://github.com/Leandros/WindowsHModular, it's probably not so bad after all...

from corrade.

mosra avatar mosra commented on May 24, 2024

Fixed in d3f4a0c -- the Windows <malloc.h> doesn't seem to have that much cruft, after all.

from corrade.

pezcode avatar pezcode commented on May 24, 2024

Thank you πŸ™‡

from corrade.

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.