Mercurial > octave
diff libinterp/octave-value/ov.cc @ 16323:e769440b39db
provide int64 extractors for octave_value class
* ov.h (octave_value::int64_value, octave_value::uint64_value):
New functions.
* ov-base.h, ov-base.cc (octave_base_value::int64_value,
octave_base_value::uint64_value): New functions.
* ov.cc (octave_value::idx_type_value): Use int64_value if
USE_64_BIT_IDX_T is defined.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 16 Mar 2013 03:58:07 -0400 |
parents | 1785493171ac |
children | 2ed5bc680c71 d63878346099 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov.cc Sat Mar 16 03:41:21 2013 -0400 +++ b/libinterp/octave-value/ov.cc Sat Mar 16 03:58:07 2013 -0400 @@ -1540,12 +1540,10 @@ octave_idx_type octave_value::idx_type_value (bool req_int, bool frc_str_conv) const { -#if SIZEOF_OCTAVE_IDX_TYPE == SIZEOF_LONG - return long_value (req_int, frc_str_conv); -#elif SIZEOF_OCTAVE_IDX_TYPE == SIZEOF_INT +#if defined (USE_64_BIT_IDX_T) + return int64_value (req_int, frc_str_conv); +#else return int_value (req_int, frc_str_conv); -#else -#error "no octave_value extractor for octave_idx_type" #endif }