Mercurial > vim
view src/proto/vim9class.pro @ 33791:370543108ba1 v9.0.2114
patch 9.0.2114: overflow detection not accurate when adding digits
Commit: https://github.com/vim/vim/commit/22cbc8a4e17ce61aa460c451a26e1bff2c3d2af9
Author: Christian Brabandt <cb@256bit.org>
Date: Sun Nov 19 10:47:21 2023 +0100
patch 9.0.2114: overflow detection not accurate when adding digits
Problem: overflow detection not accurate when adding digits
Solution: Use a helper function
Use a helper function to better detect overflows before adding integer
digits to a long or an integer variable respectively. Signal the
overflow to the caller function.
closes: #13539
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 19 Nov 2023 11:00:07 +0100 |
parents | 7d9d2404a3d4 |
children | 45a50fd59a73 |
line wrap: on
line source
/* vim9class.c */ int object_index_from_itf_index(class_T *itf, int is_method, int idx, class_T *cl); 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); void ex_enum(exarg_T *eap); void typealias_free(typealias_T *ta); void typealias_unref(typealias_T *ta); void ex_type(exarg_T *eap); int class_object_index(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int verbose); ufunc_T *find_class_func(char_u **arg); int class_member_idx(class_T *cl, char_u *name, size_t namelen); ocmember_T *class_member_lookup(class_T *cl, char_u *name, size_t namelen, int *idx); int class_method_idx(class_T *cl, char_u *name, size_t namelen); ocmember_T *object_member_lookup(class_T *cl, char_u *name, size_t namelen, int *idx); int object_method_idx(class_T *cl, char_u *name, size_t namelen); ocmember_T *member_lookup(class_T *cl, vartype_T v_type, char_u *name, size_t namelen, int *idx); void emsg_var_cl_define(char *msg, char_u *name, size_t len, class_T *cl); ufunc_T *method_lookup(class_T *cl, vartype_T v_type, char_u *name, size_t namelen, int *idx); int inside_class(cctx_T *cctx_arg, class_T *cl); void copy_object(typval_T *from, typval_T *to); void copy_class(typval_T *from, typval_T *to); void class_unref(class_T *cl); int class_free_nonref(int copyID); int set_ref_in_classes(int copyID); void object_created(object_T *obj); void object_unref(object_T *obj); int object_free_nonref(int copyID); void object_free_items(int copyID); void method_not_found_msg(class_T *cl, vartype_T v_type, char_u *name, size_t len); void member_not_found_msg(class_T *cl, vartype_T v_type, char_u *name, size_t len); void f_instanceof(typval_T *argvars, typval_T *rettv); int class_instance_of(class_T *cl, class_T *other_cl); /* vim: set ft=c : */