comparison 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
comparison
equal deleted inserted replaced
16322:12fbd8d2662c 16323:e769440b39db
1538 // needing definitions for the SIZEOF_X macros in ov.h. 1538 // needing definitions for the SIZEOF_X macros in ov.h.
1539 1539
1540 octave_idx_type 1540 octave_idx_type
1541 octave_value::idx_type_value (bool req_int, bool frc_str_conv) const 1541 octave_value::idx_type_value (bool req_int, bool frc_str_conv) const
1542 { 1542 {
1543 #if SIZEOF_OCTAVE_IDX_TYPE == SIZEOF_LONG 1543 #if defined (USE_64_BIT_IDX_T)
1544 return long_value (req_int, frc_str_conv); 1544 return int64_value (req_int, frc_str_conv);
1545 #elif SIZEOF_OCTAVE_IDX_TYPE == SIZEOF_INT 1545 #else
1546 return int_value (req_int, frc_str_conv); 1546 return int_value (req_int, frc_str_conv);
1547 #else
1548 #error "no octave_value extractor for octave_idx_type"
1549 #endif 1547 #endif
1550 } 1548 }
1551 1549
1552 octave_map 1550 octave_map
1553 octave_value::map_value (void) const 1551 octave_value::map_value (void) const