Mercurial > octave
comparison libinterp/octave-value/ov-cell.h @ 30232:a2936935c7c8
attempt to limit possible const_cast damage
* Array.h (Array<T>::mex_get_data): Delete.
* Sparse.h (Sparse<T>::mex_get_data, Sparse<T>::mex_get_ir,
Sparse<T>::mex_get_jc): Delete.
* oct-inttypes.h (octave_int<T>::mex_get_data): Delete.
* mex.cc (mxArray_octave_value::get_data,
mxArray_octave_value::get_ir, mxArray_octave_value::get_jc):
Cast away const here, not in octave_value methods.
* ov.h, ov.cc (octave_value::mex_get_data, octave_value::mex_get_ir,
octave_value::mex_get_jc): Return const void pointer.
* ov-base.h (octave_base_value::mex_get_data,
octave_base_value::mex_get_ir, octave_base_value::mex_get_jc):
Likewise. Change all derived classes.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Oct 2021 17:08:44 -0400 |
parents | 72afd5cd4a0c |
children | a61e1a0f6024 |
comparison
equal
deleted
inserted
replaced
30231:c14a536a41cd | 30232:a2936935c7c8 |
---|---|
174 | 174 |
175 octave_value map (unary_mapper_t umap) const; | 175 octave_value map (unary_mapper_t umap) const; |
176 | 176 |
177 mxArray * as_mxArray (bool interleaved) const; | 177 mxArray * as_mxArray (bool interleaved) const; |
178 | 178 |
179 // Unsafe. This function exists to support the MEX interface. | 179 // This function exists to support the MEX interface. |
180 // You should not use it anywhere else. | 180 // You should not use it anywhere else. |
181 void * mex_get_data (void) const; | 181 const void * mex_get_data (void) const; |
182 | 182 |
183 private: | 183 private: |
184 | 184 |
185 void clear_cellstr_cache (void) const | 185 void clear_cellstr_cache (void) const |
186 { m_cellstr_cache.reset (); } | 186 { m_cellstr_cache.reset (); } |