[Pkg-octave-commit] [SCM] octave-symbolic branch, master, updated. a718b53403d9f164f8c2a3df521385a01d28a11b
adb014
adb014 at 416fae20-06d0-4450-9b69-c6c34d4b5f03
Mon Jan 3 03:40:49 UTC 2011
The following commit has been merged in the master branch:
commit b121cf3fea6585aab6d70def53444eddaa0b0a32
Author: adb014 <adb014 at 416fae20-06d0-4450-9b69-c6c34d4b5f03>
Date: Wed Oct 4 20:51:44 2006 +0000
Start fixing the main INDEX file and making a clearer split with the octave core functions
git-svn-id: https://octave.svn.sourceforge.net/svnroot/octave/trunk/octave-forge/main/symbolic@2745 416fae20-06d0-4450-9b69-c6c34d4b5f03
diff --git a/DESCRIPTION b/DESCRIPTION
index 66ede2a..8fac470 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Name: Symbolic
-Version: 1.0.0
-Date: 2006-08-05
+Version: 1.0.1
+Date: 2006-10-03
Author: Various Authors
Maintainer: The Octave Community
Title: Symbolic Computations.
diff --git a/src/symbols.cc b/src/symbols.cc
index 0cb7733..92009ac 100644
--- a/src/symbols.cc
+++ b/src/symbols.cc
@@ -31,6 +31,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <octave/oct-obj.h>
#include <octave/pager.h>
#include <octave/quit.h>
+#include <octave/variables.h>
#include <ginac/ginac.h>
#include "ov-vpa.h"
@@ -119,17 +120,39 @@ bool get_relation(const octave_value arg, GiNaC::relational& relation)
return true;
}
+static bool symbolic_type_loaded = false;
+
+void
+load_symbolic_type (void)
+{
+ if (! symbolic_type_loaded)
+ {
+ octave_vpa::register_type ();
+ octave_ex::register_type ();
+ octave_ex_matrix::register_type ();
+ octave_relational::register_type ();
+
+ install_ex_matrix_ops();
+ install_ex_ops();
+ install_vpa_ops();
+ symbolic_type_loaded = true;
+
+ // We should lock the constructor functions of this type in place,
+ // otherwise something like
+ // "symbols(); a=sym('V_max'); clear functions; a" generates
+ // a seg-fault. Note this relies on the fact that Fsym, Fex_matrix
+ // and Fvpa are linked into the symbols.oct file. If th
+ // moved to this locking needs to be rethought.
+ mlock ("sym");
+ mlock ("ex_matrix");
+ mlock ("vpa");
+ }
+}
+
DEFUN_DLD(symbols,args,,"Initialize symbolic manipulation")
{
octave_value retval;
- octave_vpa::register_type ();
- octave_ex::register_type ();
- octave_ex_matrix::register_type ();
- octave_relational::register_type ();
-
- install_ex_matrix_ops();
- install_ex_ops();
- install_vpa_ops();
+ load_symbolic_type ();
return retval;
}
--
octave-symbolic
More information about the Pkg-octave-commit
mailing list