[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new snapshot (2.9.10)
From: |
John W. Eaton |
Subject: |
Re: new snapshot (2.9.10) |
Date: |
Fri, 23 Mar 2007 15:19:40 -0400 |
On 23-Mar-2007, Thomas Treichl wrote:
| only a wish: Can you please fix the example/make_int.cc - I get an error when
| trying to compile this with mkoctfile. I'm not able to fix this problem on my
own.
|
| bash$ mkoctfile make_int.cc
| make_int.cc: In member function 'octave_value* octave_integer::clone()':
| make_int.cc:74: error: cannot convert 'octave_integer*' to 'octave_value*'
in
| return
| make_int.cc: In function 'octave_value_list Fdoit(const octave_value_list&,
| int)':
| make_int.cc:326: error: invalid initialization of reference of type 'const
| octave_value&' from expression of type 'const octave_base_value'
Try the following patch.
jwe
ChangeLog:
2007-03-23 John W. Eaton <address@hidden>
* examples/make_int.cc (octave_integer::clone): Return type is
pointer to octave_base_value, not octave_value.
(Fdoit): Rep is reference to octave_base_value, not octave_value.
Index: examples/make_int.cc
===================================================================
RCS file: /cvs/octave/examples/make_int.cc,v
retrieving revision 1.13
diff -u -u -r1.13 make_int.cc
--- examples/make_int.cc 26 Apr 2005 19:24:27 -0000 1.13
+++ examples/make_int.cc 23 Mar 2007 19:16:18 -0000
@@ -71,7 +71,7 @@
~octave_integer (void) { }
- octave_value *clone (void) { return new octave_integer (*this); }
+ octave_base_value *clone (void) { return new octave_integer (*this); }
#if 0
void *operator new (size_t size);
@@ -323,7 +323,7 @@
// object, so we can peek at the representation and extract the
// data.
- const octave_value& rep = args(0).get_rep ();
+ const octave_base_value& rep = args(0).get_rep ();
int my_value = ((const octave_integer&) rep) . integer_value ();
- Re: new snapshot (2.9.10), (continued)
Re: new snapshot (2.9.10), Thomas Treichl, 2007/03/23
- Re: new snapshot (2.9.10),
John W. Eaton <=