Mercurial > vim
diff src/proto/vim9class.pro @ 34472:5c1a025192ed v9.1.0148
patch 9.1.0148: Vim9: can't call internal methods with objects
Commit: https://github.com/vim/vim/commit/d3eae7bc116297f70220f21ded436ed0a88066d8
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sun Mar 3 16:26:58 2024 +0100
patch 9.1.0148: Vim9: can't call internal methods with objects
Problem: Vim9: can't call internal methods with objects
Solution: Add support for empty(), len() and string() function
calls for objects (Yegappan Lakshmanan)
closes: #14129
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 03 Mar 2024 16:45:06 +0100 |
parents | 0f2632b04cde |
children | 5b25ec43f208 |
line wrap: on
line diff
--- a/src/proto/vim9class.pro +++ b/src/proto/vim9class.pro @@ -1,5 +1,7 @@ /* vim9class.c */ int object_index_from_itf_index(class_T *itf, int is_method, int idx, class_T *cl); +int is_valid_builtin_obj_methodname(char_u *funcname); +ufunc_T *class_get_builtin_method(class_T *cl, class_builtin_T builtin_method, int *method_idx); void ex_class(exarg_T *eap); type_T *oc_member_type(class_T *cl, int is_object, char_u *name, char_u *name_end, int *member_idx); type_T *oc_member_type_by_idx(class_T *cl, int is_object, int member_idx); @@ -34,6 +36,10 @@ void member_not_found_msg(class_T *cl, v void defcompile_class(class_T *cl); void defcompile_classes_in_script(void); int is_class_name(char_u *name, typval_T *rettv); +void protected_method_access_errmsg(char_u *method_name); +int object_empty(object_T *obj); +int object_len(object_T *obj); +char_u *object_string(object_T *obj, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val); int class_instance_of(class_T *cl, class_T *other_cl); void f_instanceof(typval_T *argvars, typval_T *rettv); /* vim: set ft=c : */