Use Apple ObjC API on darwin
parent
cb2d1d1fce
commit
c03f652d2a
3
moo.mprj
3
moo.mprj
|
@ -2,6 +2,9 @@
|
|||
<medit-project version="1.0" type="C" name="moo">
|
||||
<active>debug</active>
|
||||
<configurations>
|
||||
<darwin>
|
||||
<build_dir>build/darwin</build_dir>
|
||||
</darwin>
|
||||
<debug>
|
||||
<build_dir>build/debug</build_dir>
|
||||
<configure>
|
||||
|
|
|
@ -11,8 +11,14 @@
|
|||
* See COPYING file that comes with this distribution.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#import "moocobject.h"
|
||||
|
||||
#ifdef MOO_OS_DARWIN
|
||||
#define class_get_class_name(klass) (klass->name)
|
||||
#define sel_get_name sel_getName
|
||||
#endif
|
||||
|
||||
#define OBJECT_HAS_TOGGLE_REF_FLAG 1
|
||||
#define OBJECT_HAS_TOGGLE_REF() ((g_datalist_get_flags (&moo_c_object_qdata) & OBJECT_HAS_TOGGLE_REF_FLAG) != 0)
|
||||
|
||||
|
@ -44,6 +50,7 @@ toggle_refs_notify (MooCObject *object,
|
|||
return self;
|
||||
}
|
||||
|
||||
#ifndef MOO_OS_DARWIN
|
||||
- (retval_t) forward :(SEL)aSel :(arglist_t)argFrame
|
||||
{
|
||||
MOO_UNUSED_VAR (argFrame);
|
||||
|
@ -51,6 +58,15 @@ toggle_refs_notify (MooCObject *object,
|
|||
sel_get_name (aSel), [self name], (gpointer) self);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
- forward: (SEL)aSel :(marg_list)args
|
||||
{
|
||||
MOO_UNUSED_VAR (args);
|
||||
g_critical ("no method `%s' found in <%s at %p>",
|
||||
sel_get_name (aSel), [self name], (gpointer) self);
|
||||
return nil;
|
||||
}
|
||||
#endif
|
||||
|
||||
- init
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue