Follow-up Comment #5, bug #36706 (project gnustep):

Hi Fred,

It seems like you're correct. At least, Apple runtime reference documentation
explicitly states that class_getMessageImplementation() might return a pointer
to `a part of the runtime's message forwarding machinery'. So we technically
would need to modify the behaviour of our runtime to be compatible with the
Apple implementation. 

Since that is a bit tedious (since it means juggling around with varargs and
various places where the return value might end up), my is a take on this
issue is that we should, in the meantime, do two things:

a) Don't raise an exception in gs_objc_msg_forward2(), just return NULL if we
cannot get a signature to construct a cframe for. The function is a hook for
the runtime, which should tolerate if the forwarding mechanism doesn't come up
with a sensible match.

b) Amend our implementation of `-performSelector:' to just use
objc_msg_lookup() and call the returned IMP. This is what a message send
compiles to anyways, which (I think) should be more robust than the present
code that calls class_getMethodImplementation(). But then again I might be
missing the reason why we did it that way in the first place...

Cheers,

Niels

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36706>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to