Mercurial > mxe-octave
comparison src/stable-octave-3-fixes.patch @ 3720:5d0ed3ca5910
new patch for stable-octave package
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 05 Oct 2014 11:12:39 -0400 |
parents | 992be3109433 |
children |
comparison
equal
deleted
inserted
replaced
3719:9caae5336e92 | 3720:5d0ed3ca5910 |
---|---|
1 # HG changeset patch | |
2 # User John W. Eaton <jwe@octave.org> | |
3 # Date 1412519047 14400 | |
4 # Sun Oct 05 10:24:07 2014 -0400 | |
5 # Branch stable | |
6 # Node ID 3ffb8f53e94019084321d065390f4d4e215fd465 | |
7 # Parent 432ffa35de136a5dfd2a717a598750b62e6944f9 | |
8 use correct HDF5 size for octave_idx_type on Windows-64 (bug #43101) | |
9 | |
10 * ls-hdf5.h: Define H5T_NATIVE_IDX to H5T_NATIVE_INT64 when using | |
11 64-bit indexing. | |
12 | |
13 diff --git a/libinterp/corefcn/ls-hdf5.h b/libinterp/corefcn/ls-hdf5.h | |
14 --- a/libinterp/corefcn/ls-hdf5.h | |
15 +++ b/libinterp/corefcn/ls-hdf5.h | |
16 @@ -204,7 +204,7 @@ | |
17 const char *attr_name, void *buf); | |
18 | |
19 #ifdef USE_64_BIT_IDX_T | |
20 -#define H5T_NATIVE_IDX H5T_NATIVE_LONG | |
21 +#define H5T_NATIVE_IDX H5T_NATIVE_INT64 | |
22 #else | |
23 #define H5T_NATIVE_IDX H5T_NATIVE_INT | |
24 #endif | |
25 # HG changeset patch | |
26 # User John W. Eaton <jwe@octave.org> | |
27 # Date 1412520111 14400 | |
28 # Sun Oct 05 10:41:51 2014 -0400 | |
29 # Branch stable | |
30 # Node ID 0279c601b49ce5d539b1ae938e8ec562b63f1ced | |
31 # Parent 3ffb8f53e94019084321d065390f4d4e215fd465 | |
32 compute for loop indices consistently with range element results | |
33 | |
34 * pt-eval.cc (tree_evaluator::visit_simple_for_command): Use | |
35 Range::elem instead of compuiting elements directly. This change | |
36 appears to fix obscure test failures in eig.cc-tst on 64-bit Windows | |
37 systems. See also task #13313. | |
38 | |
39 diff --git a/libinterp/parse-tree/pt-eval.cc b/libinterp/parse-tree/pt-eval.cc | |
40 --- a/libinterp/parse-tree/pt-eval.cc | |
41 +++ b/libinterp/parse-tree/pt-eval.cc | |
42 @@ -336,21 +336,10 @@ | |
43 Range rng = rhs.range_value (); | |
44 | |
45 octave_idx_type steps = rng.nelem (); | |
46 - double b = rng.base (); | |
47 - double increment = rng.inc (); | |
48 | |
49 for (octave_idx_type i = 0; i < steps; i++) | |
50 { | |
51 - // Use multiplication here rather than declaring a | |
52 - // temporary variable outside the loop and using | |
53 - // | |
54 - // tmp_val += increment | |
55 - // | |
56 - // to avoid problems with limited precision. Also, this | |
57 - // is consistent with the way Range::matrix_value is | |
58 - // implemented. | |
59 - | |
60 - octave_value val (b + i * increment); | |
61 + octave_value val (rng.elem (i)); | |
62 | |
63 ult.assign (octave_value::op_asn_eq, val); | |
64 |