Mercurial > vim
diff src/proto/vim9class.pro @ 32972:e4851934751a
patch 9.0.1786: Vim9: need instanceof() function
Commit: https://github.com/vim/vim/commit/afe0466fb1695fa8b9782eea8a8e9f9540d4cb85
Author: LemonBoy <thatlemon@gmail.com>
Date: Wed Aug 23 21:08:11 2023 +0200
patch 9.0.1786: Vim9: need instanceof() function
Problem: Vim9: need instanceof() function
Solution: Implement instanceof() builtin
Implemented in the same form as Python's isinstance because it allows
for checking multiple class types at the same time.
closes: #12867
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 23 Aug 2023 21:15:08 +0200 |
parents | ffa11e2757e7 |
children | 667a17904f64 |
line wrap: on
line diff
--- a/src/proto/vim9class.pro +++ b/src/proto/vim9class.pro @@ -15,4 +15,6 @@ void class_unref(class_T *cl); void object_created(object_T *obj); void object_cleared(object_T *obj); int object_free_nonref(int copyID); +void f_instanceof(typval_T *argvars, typval_T *rettv); +int class_instance_of(class_T *cl, class_T *other_cl); /* vim: set ft=c : */