Hello everybody out there using and developping
octave!
I would love to port some matlab code to run with
octave. Beside some
unproblematic m-files, there is a C struct type
coming along with
delete.c, subasgn.c and subsref.c in its @Type
directory, each
implementing a mexFunction(..), handling syntax and
basic access for
the types instances.
As I'm new to such sophisticated matlab and octave
programming, I
don't know wether the approach taken here is the
right way or whether
it's compatible with octave.
The problem is, that as soon as a call to the
function mxGetField
occurs (triggered for example by an acces to a field
of an instance of
the type, resulting calling the
@Type/subsref.c:mexFunction(..) )
octave stumbles over it, called in the following
manner
void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[]
)
{
mxArray *ptr;
..
ptr = mxGetField(prhs[0], 0, "handle");
..
}
which results in the following octave (version 3.8.1
shipped in
lubuntu 14.10) error:
error: octave_class::as_mxArray (): wrong type
argument 'class'
panic: impossible state reached in file
'corefcn/mex.cc' at line 556
[snip]