diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 14:25:29 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:22:16 -0700 |
commit | cdf3de175d41acec85d6c3cc8b599f79658edb06 (patch) | |
tree | 7f88b2ac4f2fb3ca547575063bae003ade56abab /gdb/opencl-lang.c | |
parent | d3824ae14ac64c10733537969a0bd58a9385cbf2 (diff) | |
download | gdb-cdf3de175d41acec85d6c3cc8b599f79658edb06.zip gdb-cdf3de175d41acec85d6c3cc8b599f79658edb06.tar.gz gdb-cdf3de175d41acec85d6c3cc8b599f79658edb06.tar.bz2 |
Turn value_incref and value_decref into methods
This changes value_incref and value_decref to be methods of value.
Much of this patch was written by script.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/opencl-lang.c')
-rw-r--r-- | gdb/opencl-lang.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index e4a88a2..81889b9 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -110,7 +110,7 @@ allocate_lval_closure (int *indices, int n, struct value *val) c->n = n; c->indices = XCNEWVEC (int, n); memcpy (c->indices, indices, n * sizeof (int)); - value_incref (val); /* Increment the reference counter of the value. */ + val->incref (); /* Increment the reference counter of the value. */ c->val = val; return c; @@ -242,7 +242,7 @@ lval_func_free_closure (struct value *v) if (c->refc == 0) { - value_decref (c->val); /* Decrement the reference counter of the value. */ + c->val->decref (); /* Decrement the reference counter of the value. */ xfree (c->indices); xfree (c); } |