> Ideally we could do vim.f.{function-name}() for every function defined
> in eval.c.  That's more than 250 functions.  Creating a funcref for each
> of them might slow down startup.  I assume we can do it only when used.

New funcref structure is something like `struct func_T {void *func_data; struct 
func_funcs *functions; <GC vars>};` (former is arbitrary reference with 
function definition; latter holds references to C functions that actually call 
various functions, they all always receive func_data). It all can easily be 
defined statically assuming `struct type1_S {type2_T *data;};` and `struct 
generictype1_S {void *data;};` are equivalent structures pointers to which can 
be casted to each other without problems. AFAIK this statement is true. You 
only need to create dictionary and record these functions there with my 
suggestion then. Without it can be left in the statically created array; there 
is no must in keeping built-ins strictly in dictionary like I suggested, only 
reducing asymptomatic complexity of getting funcref from function name.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui