Re: Defs file format Revision 3



Ariel Rios <ariel linuxppc org> writes: 
> Still it have some comments inside /* */
> whenever I don't know if we do need this or that.

For most of your "does anyone need this" comments, the answer is that
C++ or other compiled bindings need it, but dynamic languages do not.
 
> /*
> 	Do we need this native stuff?
> 	Why do we need to pass such a pointer as an argument
> */
> 
> Ex:
>   (define-function config_set_set_handler
>    (in-module "Gnome")
>    (c-name "gnome_config_set_set_handler")
>    (parameters 
>        (in "native" "func" "void (*func)(void*)")

Lame C++ wrappers could just wrap this in a totally trivial way,
printing the native function out into the C++ header, or a more
complex wrapper could create a slot/functor object that matched the
native function's type.
 
> ===
> METHODS
> 
> /*
> 	Cant' we just handle methods with define-func
>         and just add a field called,
>         (is-method bool) ???
> */

I think you could, yes, the only reason I can think of why it matters
is that with define-method you know is-method before parsing any of
the other args. This doesn't seem very important.
      
> ===
> OBJECT ARGUMENTS
> 
> /*
>   What are these for?
> */
> 
> (define-object-argument arg-name

C++ bindings may need to know about arguments when generating code,
rather than at runtime, and this saves writing a custom C program to
query all the args.
 
> ===
> USER-FUNCTIONS
> 
> /*
>   What are these intended for?
> */
> 
> (define-user-function name

Autogeneration of a wrapper with a slot/functor replacing the user
function, I would imagine.
 
> ===
> TYPEDEF
> 
> /*
>   And this?
>   Do anyone needs this?
> */
> (define-typedef new-name

Yes, Inti uses this or could use this from time to time.

Havoc






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]