Code Monkey home page Code Monkey logo

Comments (7)

neelance avatar neelance commented on August 23, 2024

Hi, thanks for using ffi-gen.

The first define should be easy to fix, I just need to parse more
arithmetic expressions. I'll look into that soon.

The second one is more difficult. Maybe ffi-gen could detect that this is
only a call to another function and generate a wrapper function for that.
But the arguments are also difficult to handle (using sizeof, etc.). So I
think the better solution is to write these wrappers by hand. Just reopen
the generated module after including it and add the methods. Are you okay
with that?

from ffi_gen.

ingeniarius avatar ingeniarius commented on August 23, 2024

Yes, it's ok!

But, is it possible to collect code which cannot be processed?
Thus, we have a chance to know what could be lost.

Thanks for this magic tool!

from ffi_gen.

neelance avatar neelance commented on August 23, 2024

Good idea! I will add warnings on the console.

from ffi_gen.

neelance avatar neelance commented on August 23, 2024

I've added support for more defines in 85abca7 and warnings for unsupported values in 7f4ef20. I think I will also add support for defines like "libssh2_channel_open_session" soon, because I noticed that they are quite common in many libraries.

from ffi_gen.

ingeniarius avatar ingeniarius commented on August 23, 2024

Good progress! Tnx!

from ffi_gen.

neelance avatar neelance commented on August 23, 2024

I've added first processing of method-like defines in 329fda9. It is still quite rudimentary, but it does the job for most of libssh2's defines. I will close this issue now. Feel free to open new ones if you find problems concerning the generated methods.

from ffi_gen.

ingeniarius avatar ingeniarius commented on August 23, 2024

Thank you!

from ffi_gen.

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.