octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53856] MEX file in a private directory of a c


From: Guillaume
Subject: [Octave-bug-tracker] [bug #53856] MEX file in a private directory of a class
Date: Mon, 7 May 2018 06:38:16 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.gnu.org/bugs/?53856>

                 Summary: MEX file in a private directory of a class
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Mon 07 May 2018 10:38:14 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

I observed errors by which M functions in a private directory are not
overshadowed by an associated MEX file. I have got plenty of examples where it
does work but it seems to fail with the toy example below.

Just compile the MEX file with mkoctfile --mex mysubfunction.c and run:


octave:1> a = myclass ();
octave:2> mymethod (a)
error: Calling the M-file!
error: called from
    mysubfunction at line 2 column 3
    mymethod at line 2 column 3



@myclass
├── myclass.m
├── mymethod.m
└── private
    ├── mysubfunction.c
    ├── mysubfunction.m
    └── mysubfunction.mex



function m = myclass
  m = class (struct ('a',1), 'myclass');
endfunction



function mymethod(a)
  mysubfunction ();
endfunction



function mysubfunction ()
  error ("Calling the M-file!");
endfunction



#include "mex.h"

void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
  mexErrMsgTxt("Calling the MEX-file!");
}





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53856>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]