[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Another OOP issue
From: |
John W. Eaton |
Subject: |
Another OOP issue |
Date: |
Fri, 26 Sep 2008 15:31:09 -0400 |
On 24-Sep-2008, David Bateman wrote:
| Ok, attached is the latest version of my toy galois field class (though
| its already useful as is, but a duplicate of whats in octave-forge).
| There are two versions of the isprimitive function, one that can be
| called with matrix arguments and another with galois fields.
|
| The version that takes a galois field manipulates the data and then
| hands it off to the generic version. So @gf/isprimitive calls isprimitive.
|
| If I run
|
| addpath("/home/adb014/octave/galois")
| isprimitive(gf([1,1,1]))
|
| then everything is fine. However, on the second call the galois field
| version of isprimitive is not called. and I get
|
| isprimitive(gf([1,0,1]))
| error: rem: complex arguments are not allowed
| error: called from:
| error:
|
/home/adb014/octave/code/octave-3.1-build/../octave-3.1-hg/scripts/general/rem.m
|
| at line 61, column 5
| error: /home/adb014/octave/galois/isprimitive.m at line 3, column 1
|
| which is just rem complaining about getting a galois field.
|
| So it seems that the fact that @gf/isprimitive calls isprimitive is
| somehow removing the overloading of isprimitive. Any ideas?
Please try the following patch. Gah, who wrote this mess anyway?
Thanks,
jwe
# HG changeset patch
# User John W. Eaton <address@hidden>
# Date 1222456781 14400
# Node ID 344c9b6532a2dbc0f5ca9a8abff57530f4225274
# Parent 265a821f65557a6925bb84df943473159e7e82e4
symtab.cc (out_of_date_check_internal): fix order of arguments in call to
load_path::find_method
diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-26 John W. Eaton <address@hidden>
+
+ * symtab.cc (out_of_date_check_internal):
+ Fix order of arguments in call to load_path::find_method.
+
2008-09-26 David Bateman <address@hidden>
* ov-class.h (idx_vector index_vector (void) const): Declare new
diff --git a/src/symtab.cc b/src/symtab.cc
--- a/src/symtab.cc
+++ b/src/symtab.cc
@@ -194,7 +194,7 @@
// decide whether it came from a relative lookup.
if (! dispatch_type.empty ())
- file = load_path::find_method (nm, dispatch_type,
+ file = load_path::find_method (dispatch_type, nm,
dir_name);
if (file.empty ())