diff options
Diffstat (limited to '')
-rw-r--r-- | src/testing.c | 11 |
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; |