Hello,

Is there any reason in eo2 why the eo wrapper function (the ones
defined by EO2_FUNC_BODY et al) doesn't call the function directly,
instead of registering it with Eo2_Op_Description. Which adds an
unnecessary indirection.

Also, I've been experimenting with changing Eo to make the class
interface available at preprocessing-time, which allow interesting
uses by preprocessor metaprogramming and/or by custom preprocessors,
without requiring an almost C parser.

I'm calling Eo3 here just to differentiate (and be able to compile and
link along-side eo2).

The header would declare the class like this:

#define EO3_SIMPLE_CLASS eo3_simple                           \
    , EO3_FUNCTION(inc, _inc, void)                           \
    , EO3_FUNCTION(get, _get, int)                            \
    , EO3_FUNCTION(set, _set, void, int)
    , EO3_VIRTUAL_FUNCTION(virtual, int, int)
    , EO3_STATIC_FUNCTION(hello, int)

EO3_DECLARE_CLASS(EO3_SIMPLE_CLASS)

And define it doing something like this:

typedef struct
{
   int x;
} Private_Data;

static void _inc(Eo *objid EINA_UNUSED, Private_Data* self)
{
  self->x += 1;
}
static int _get(Eo *objid EINA_UNUSED, Private_Data* self)
{
  return self->x;
}
static void _set(Eo *objid EINA_UNUSED, Private_Data* self, int x)
{
  self->x = x;
}

EO3_DEFINE_CLASS(EO3_SIMPLE_CLASS, (EO2_BASE_CLASS), Private_Data)

Is this syntax interesting?

Regards,
-- 
Felipe Magno de Almeida

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to