Mercurial > octave
comparison libinterp/octave-value/ov-classdef.cc @ 30139:c789e728d57a
Backed out changeset 938794bc82b7
Renaming octave_base_value::count to m_count breaks some packages that
define new octave_value data types. Maybe those packages shouldn't be
touching the count directly, but they do. Since we may also want to
switch to using std::shared_ptr to manage octave_value objects instead
of our own custom reference counting implmentation, it is probably
best to delay this change until we know exactly what path we want to
take.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 08 Sep 2021 11:14:44 -0400 |
parents | 938794bc82b7 |
children | 03ff3f1020cf |
comparison
equal
deleted
inserted
replaced
30138:2dca5c25237d | 30139:c789e728d57a |
---|---|
86 { | 86 { |
87 octave_value_list args; | 87 octave_value_list args; |
88 | 88 |
89 args(1) = make_idx_args (type, idx, "subsref"); | 89 args(1) = make_idx_args (type, idx, "subsref"); |
90 | 90 |
91 m_count++; | 91 count++; |
92 args(0) = octave_value (this); | 92 args(0) = octave_value (this); |
93 | 93 |
94 retval = meth.execute (args, nargout, true, "subsref"); | 94 retval = meth.execute (args, nargout, true, "subsref"); |
95 | 95 |
96 return retval; | 96 return retval; |
129 { | 129 { |
130 octave_value_list args; | 130 octave_value_list args; |
131 | 131 |
132 args(1) = make_idx_args (type, idx, "subsref"); | 132 args(1) = make_idx_args (type, idx, "subsref"); |
133 | 133 |
134 m_count++; | 134 count++; |
135 args(0) = octave_value (this); | 135 args(0) = octave_value (this); |
136 | 136 |
137 retval = meth.execute (args, 1, true, "subsref"); | 137 retval = meth.execute (args, 1, true, "subsref"); |
138 | 138 |
139 return retval.length () > 0 ? retval(0) : octave_value (); | 139 return retval.length () > 0 ? retval(0) : octave_value (); |
165 { | 165 { |
166 octave_value_list args; | 166 octave_value_list args; |
167 | 167 |
168 args(1) = make_idx_args (type, idx, "subsasgn"); | 168 args(1) = make_idx_args (type, idx, "subsasgn"); |
169 | 169 |
170 m_count++; | 170 count++; |
171 args(0) = octave_value (this); | 171 args(0) = octave_value (this); |
172 args(2) = rhs; | 172 args(2) = rhs; |
173 | 173 |
174 octave_value_list retlist; | 174 octave_value_list retlist; |
175 | 175 |
214 { | 214 { |
215 octave::cdef_method meth = cls.find_method ("size"); | 215 octave::cdef_method meth = cls.find_method ("size"); |
216 | 216 |
217 if (meth.ok ()) | 217 if (meth.ok ()) |
218 { | 218 { |
219 m_count++; | 219 count++; |
220 octave_value_list args (1, octave_value (this)); | 220 octave_value_list args (1, octave_value (this)); |
221 | 221 |
222 octave_value_list lv = meth.execute (args, 1, true, "size"); | 222 octave_value_list lv = meth.execute (args, 1, true, "size"); |
223 if (lv.length () <= 0 | 223 if (lv.length () <= 0 |
224 || ! lv(0).is_matrix_type () || ! lv(0).dims ().isvector ()) | 224 || ! lv(0).is_matrix_type () || ! lv(0).dims ().isvector ()) |
244 | 244 |
245 if (meth.ok ()) | 245 if (meth.ok ()) |
246 { | 246 { |
247 octave_value_list args (idx.length () + 1, octave_value ()); | 247 octave_value_list args (idx.length () + 1, octave_value ()); |
248 | 248 |
249 m_count++; | 249 count++; |
250 args(0) = octave_value (this); | 250 args(0) = octave_value (this); |
251 | 251 |
252 for (octave_idx_type i = 0; i < idx.length (); i++) | 252 for (octave_idx_type i = 0; i < idx.length (); i++) |
253 args(i+1) = idx(i); | 253 args(i+1) = idx(i); |
254 | 254 |