mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
Added warning in comments.
(CALL_METHOD_IN_CLASS): New macro. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@272 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
621d181566
commit
04ab39aea8
2 changed files with 30 additions and 2 deletions
|
@ -33,9 +33,23 @@
|
||||||
encounter a common ancestor.) CLASS and BEHAVIOR should share the
|
encounter a common ancestor.) CLASS and BEHAVIOR should share the
|
||||||
same instance variable layout.
|
same instance variable layout.
|
||||||
|
|
||||||
xxx We do not yet deal with Protocols, but we should. */
|
We do not yet deal with Protocols; perhaps we should.
|
||||||
|
|
||||||
|
The semantics of this stuff is pretty fragile. I don't recommend
|
||||||
|
that you use it in code you write. It might go away completely in
|
||||||
|
future.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
void class_add_behavior (Class class, Class behavior);
|
void class_add_behavior (Class class, Class behavior);
|
||||||
|
|
||||||
|
/* This macro may go away in future.
|
||||||
|
Use it carefully, you can really screw yourself up by sending to
|
||||||
|
a CLASS with a different instance variable layout than "self". */
|
||||||
|
|
||||||
|
#define CALL_METHOD_IN_CLASS(CLASS, METHOD, ARGS...) \
|
||||||
|
((*imp([CLASS class], @selector(METHOD))) \
|
||||||
|
self, @selector(METHOD), ## ARGS)
|
||||||
|
|
||||||
/* Set to non-zero if you want debugging messages on stderr. */
|
/* Set to non-zero if you want debugging messages on stderr. */
|
||||||
void set_behavior_debug(int i);
|
void set_behavior_debug(int i);
|
||||||
|
|
|
@ -33,9 +33,23 @@
|
||||||
encounter a common ancestor.) CLASS and BEHAVIOR should share the
|
encounter a common ancestor.) CLASS and BEHAVIOR should share the
|
||||||
same instance variable layout.
|
same instance variable layout.
|
||||||
|
|
||||||
xxx We do not yet deal with Protocols, but we should. */
|
We do not yet deal with Protocols; perhaps we should.
|
||||||
|
|
||||||
|
The semantics of this stuff is pretty fragile. I don't recommend
|
||||||
|
that you use it in code you write. It might go away completely in
|
||||||
|
future.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
void class_add_behavior (Class class, Class behavior);
|
void class_add_behavior (Class class, Class behavior);
|
||||||
|
|
||||||
|
/* This macro may go away in future.
|
||||||
|
Use it carefully, you can really screw yourself up by sending to
|
||||||
|
a CLASS with a different instance variable layout than "self". */
|
||||||
|
|
||||||
|
#define CALL_METHOD_IN_CLASS(CLASS, METHOD, ARGS...) \
|
||||||
|
((*imp([CLASS class], @selector(METHOD))) \
|
||||||
|
self, @selector(METHOD), ## ARGS)
|
||||||
|
|
||||||
/* Set to non-zero if you want debugging messages on stderr. */
|
/* Set to non-zero if you want debugging messages on stderr. */
|
||||||
void set_behavior_debug(int i);
|
void set_behavior_debug(int i);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue