[Pkg-octave-commit] [SCM] octave-symbolic branch, master, updated. a718b53403d9f164f8c2a3df521385a01d28a11b
adb014
adb014 at 416fae20-06d0-4450-9b69-c6c34d4b5f03
Mon Jan 3 03:40:43 UTC 2011
The following commit has been merged in the master branch:
commit 96651a19c750af7a506af04bb1684bb2b52383cc
Author: adb014 <adb014 at 416fae20-06d0-4450-9b69-c6c34d4b5f03>
Date: Sat Apr 22 17:42:22 2006 +0000
some fixes for recent octave_value changes
git-svn-id: https://octave.svn.sourceforge.net/svnroot/octave/trunk/octave-forge/main/symbolic@2416 416fae20-06d0-4450-9b69-c6c34d4b5f03
diff --git a/ov-vpa.h b/ov-vpa.h
index d77929e..1d8acce 100644
--- a/ov-vpa.h
+++ b/ov-vpa.h
@@ -23,10 +23,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// GiNaC
#include <ginac/ginac.h>
-#include <octave/ov-base.h>
+#include <octave/ov.h>
+#include <octave/oct-alloc.h>
+#include <octave/ov-typeinfo.h>
-#ifndef OV_REP_TYPE
+#ifdef OV_REP_TYPE
+#define TYPE_CONV_FCN OV_REP_TYPE::type_conv_fcn
+#else
#define OV_REP_TYPE octave_value
+#define TYPE_CONV_FCN type_conv_fcn
#endif
// vpa values.
@@ -44,7 +49,7 @@ public:
~octave_vpa (void) { }
- OV_REP_TYPE *clone (void) { return new octave_vpa (*this); }
+ OV_REP_TYPE *clone (void) const { return new octave_vpa (*this); }
#if 0
void *operator new (size_t size);
diff --git a/sym-bool.cc b/sym-bool.cc
index e0856ae..4c79e8a 100644
--- a/sym-bool.cc
+++ b/sym-bool.cc
@@ -37,7 +37,7 @@ DEFUN_DLD(is_vpa, args, ,
DEFUN_DLD(is_sym,args, ,"Return true if an object is of type sym false otherwise.\n")
{
bool retval;
- const octave_value& rep = args(0).get_rep();
+ const OV_REP_TYPE& rep = args(0).get_rep();
retval = args(0).type_id () == octave_ex::static_type_id () &&
GiNaC::is_a<GiNaC::symbol>(((octave_ex& ) rep).ex_value ());
diff --git a/symbols.cc b/symbols.cc
index 3e1f0d9..abdc806 100644
--- a/symbols.cc
+++ b/symbols.cc
@@ -47,7 +47,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
bool get_expression(const octave_value arg, GiNaC::ex& expression)
{
- const octave_value& rep = (arg).get_rep();
+ const OV_REP_TYPE& rep = (arg).get_rep();
if (arg.type_id () == octave_vpa::static_type_id ())
{
@@ -74,7 +74,7 @@ bool get_expression(const octave_value arg, GiNaC::ex& expression)
bool get_symbol(const octave_value arg, GiNaC::ex& sym)
{
- const octave_value& rep = arg.get_rep ();
+ const OV_REP_TYPE& rep = arg.get_rep ();
GiNaC::ex x;
if (arg.type_id () == octave_ex::static_type_id ())
x = ((octave_ex& ) rep).ex_value();
@@ -91,7 +91,7 @@ bool get_symbol(const octave_value arg, GiNaC::ex& sym)
bool get_numeric(const octave_value arg, GiNaC::numeric& number)
{
- const octave_value& rep = arg.get_rep ();
+ const OV_REP_TYPE& rep = arg.get_rep ();
if (arg.type_id () == octave_ex::static_type_id ())
{
@@ -115,7 +115,7 @@ bool get_numeric(const octave_value arg, GiNaC::numeric& number)
bool get_relation(const octave_value arg, GiNaC::relational& relation)
{
- const octave_value& rep = arg.get_rep();
+ const OV_REP_TYPE& rep = arg.get_rep();
if (arg.type_id () == octave_relational::static_type_id ()) {
GiNaC::relational x = ((octave_relational& ) rep).relational_value();
relation = x;
@@ -382,7 +382,7 @@ Expand an expression\n\
if(args(0).type_id() == octave_ex::static_type_id())
{
- const octave_value& rep1 = args(0).get_rep();
+ const OV_REP_TYPE& rep1 = args(0).get_rep();
expression = ((const octave_ex& ) rep1).ex_value();
}
else
--
octave-symbolic
More information about the Pkg-octave-commit
mailing list