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>
diff --git a/src/proto/typval.pro b/src/proto/typval.pro
index 8cecdb8..db8f94e 100644
--- a/src/proto/typval.pro
+++ b/src/proto/typval.pro
@@ -51,6 +51,8 @@
 int check_for_list_or_dict_or_blob_arg(typval_T *args, int idx);
 int check_for_list_or_dict_or_blob_or_string_arg(typval_T *args, int idx);
 int check_for_opt_buffer_or_dict_arg(typval_T *args, int idx);
+int check_for_object_arg(typval_T *args, int idx);
+int check_for_class_or_list_arg(typval_T *args, int idx);
 char_u *tv_get_string(typval_T *varp);
 char_u *tv_get_string_strict(typval_T *varp);
 char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
diff --git a/src/proto/vim9class.pro b/src/proto/vim9class.pro
index 707f4ec..ffe1c64 100644
--- a/src/proto/vim9class.pro
+++ b/src/proto/vim9class.pro
@@ -15,4 +15,6 @@
 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 : */