Giter VIP home page Giter VIP logo

Comments (4)

tap avatar tap commented on August 29, 2024

Hi @andreaagostini -- this macro is already defined as you suggest, if I have understood correctly, here:

https://github.com/Cycling74/max-sdk/blob/master/source/c74support/max-includes/ext_obex.h#L508

So perhaps I'm misunderstanding or you are using an older revision of the SDK?

from max-sdk.

andreaagostini avatar andreaagostini commented on August 29, 2024

Hi @tap,

actually there is a difference between my proposal and the current definition Compare these:
#define object_method_direct(rt, sig, x, s, ...) ((rt (*)sig)object_method_direct_getmethod((t_object *)x, s))(object_method_direct_getobject((t_object *)x, s), __VA_ARGS__) // current version
vs.
#define object_method_direct(rt, sig, x, s, ...) ((rt(*)sig)object_method_direct_getmethod((t_object *)x, s))((t_object*)object_method_direct_getobject((t_object *)x, s), __VA_ARGS__) // my proposal

That is, I suggest that the return value of object_method_direct_getobject() is explicitly cast to t_object*, which is not the case currently. This would avoid a compiler error when compiling as C++.

from max-sdk.

tap avatar tap commented on August 29, 2024

Okay, I see it now and understand. Does it solve the problem to your liking if we change the line @ https://github.com/Cycling74/max-sdk/blob/master/source/c74support/max-includes/ext_obex.h#L511 to the following?

t_object *object_method_direct_getobject(t_object *x, t_symbol *sym);

from max-sdk.

andreaagostini avatar andreaagostini commented on August 29, 2024

Yes, that should do it!
Thanks,
andrea

from max-sdk.

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.