diff options
author | LemonBoy <thatlemon@gmail.com> | 2023-08-23 21:08:11 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-08-23 21:08:11 +0200 |
commit | afe0466fb1695fa8b9782eea8a8e9f9540d4cb85 (patch) | |
tree | f71446a214e45f7c0cdcb186fe40d25d1a1da39d /src/proto/vim9class.pro | |
parent | 1193951bebcff50d88403ce17dec5d3be14f131d (diff) |
patch 9.0.1786: Vim9: need instanceof() functionv9.0.1786
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>
Diffstat (limited to 'src/proto/vim9class.pro')
-rw-r--r-- | src/proto/vim9class.pro | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/proto/vim9class.pro b/src/proto/vim9class.pro index 707f4ec61c..ffe1c6444c 100644 --- 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 : */ |