[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #33014] Assignment of a class to a scalar stru
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #33014] Assignment of a class to a scalar structure seg faults |
Date: |
Fri, 08 Apr 2011 14:00:40 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.18) Gecko/20110324 Iceweasel/3.5.18 (like Firefox/3.5.18) |
Follow-up Comment #1, bug #33014 (project octave):
A simple fix is
--- src/ov-class.cc~ 2011-02-08 11:00:52.000000000 +0100
+++ src/ov-class.cc 2011-04-05 23:26:56.000000000 +0200
@@ -125,7 +125,7 @@
// Here we are just looking to see if FCN is a method or constructor
// for any class, not specifically this one.
- if (fcn->is_class_method () || fcn->is_class_constructor ())
+ if (fcn && (fcn->is_class_method () || fcn->is_class_constructor ()))
retval = fcn->dispatch_class ();
return retval;
This fixes my original problem with the segfault. However,I then see another
problem. If I then create a class "testobj" with the constructor
function a = testobj ()
a.b(1) = ftp('ftp.octave.org');
endfunction
I get the error
error: malformed class
error: assignment to structure element failed
error: assignment failed, or no method for `<unknown type> = class'
error: called from:
error: /home/dbateman/@testobj/testobj.m at line 2, column 8
D.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33014>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/