summaryrefslogtreecommitdiffstats
path: root/src/testing.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:58 +0000
commitbee19c22d569e54513a9c591441c7f411811dc81 (patch)
treeb990d2df9fddb8194bfe49e9205005a0d952bc1f /src/testing.c
parentAdding upstream version 2:9.1.0199. (diff)
downloadvim-bee19c22d569e54513a9c591441c7f411811dc81.tar.xz
vim-bee19c22d569e54513a9c591441c7f411811dc81.zip
Adding upstream version 2:9.1.0374.upstream/2%9.1.0374
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/testing.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/testing.c b/src/testing.c
index 0d731da..33de3a5 100644
--- a/src/testing.c
+++ b/src/testing.c
@@ -1091,9 +1091,8 @@ f_test_refcount(typval_T *argvars, typval_T *rettv)
case VAR_SPECIAL:
case VAR_STRING:
case VAR_INSTR:
- case VAR_CLASS:
- case VAR_OBJECT:
break;
+
case VAR_JOB:
#ifdef FEAT_JOB_CHANNEL
if (argvars[0].vval.v_job != NULL)
@@ -1132,6 +1131,14 @@ f_test_refcount(typval_T *argvars, typval_T *rettv)
if (argvars[0].vval.v_dict != NULL)
retval = argvars[0].vval.v_dict->dv_refcount - 1;
break;
+ case VAR_CLASS:
+ if (argvars[0].vval.v_class != NULL)
+ retval = argvars[0].vval.v_class->class_refcount - 1;
+ break;
+ case VAR_OBJECT:
+ if (argvars[0].vval.v_object != NULL)
+ retval = argvars[0].vval.v_object->obj_refcount - 1;
+ break;
case VAR_TYPEALIAS:
if (argvars[0].vval.v_typealias != NULL)
retval = argvars[0].vval.v_typealias->ta_refcount - 1;