mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
add comment
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30618 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bf8c2e4784
commit
2b8d035def
1 changed files with 9 additions and 0 deletions
|
@ -148,6 +148,15 @@ static IMP gs_objc_msg_forward2 (id receiver, SEL sel)
|
|||
GSCodeBuffer *memory;
|
||||
Class c;
|
||||
|
||||
/* Take care here ... the receiver may be nil (old runtimes) or may be
|
||||
* a proxy which implements a method by forwarding it (so calling the
|
||||
* method might cause recursion). However, any sane proxy ought to at
|
||||
* least implement -methodSignatureForSelector: in such a way that it
|
||||
* won't cause infinite recursion, so we check for that method being
|
||||
* implemented and call it.
|
||||
* NB. object_getClass() and class_respondsToSelector() should both
|
||||
* return NULL when given NULL arguments, so they are safe to use.
|
||||
*/
|
||||
c = object_getClass(receiver);
|
||||
if (class_respondsToSelector(c, @selector(methodSignatureForSelector:)))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue