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

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

[Octave-bug-tracker] [bug #51960] Problem with function in +package dire


From: Avinoam Kalma
Subject: [Octave-bug-tracker] [bug #51960] Problem with function in +package directory that shadows Octave function
Date: Thu, 7 Sep 2017 14:06:20 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

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

                 Summary: Problem with function in +package directory that
shadows Octave function
                 Project: GNU Octave
            Submitted by: avinoam
            Submitted on: Thu 07 Sep 2017 06:06:19 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: Avinoam
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

An example:

Create the directory c:\data\+temp
And put there the flowing trivial function, called imread.cc


#include "mex.h"

void mexFunction (int nlhs, mxArray *plhs[],
             int nrhs, const mxArray *prhs[])
{
  mexPrintf ("my imread\n");

  return;
}


Now:


>> cd c:\data\+temp
>> mkoctfile -mex imread.cc
>> cd c:\data
>> temp.imread
my imread
>> temp.imread
error: Invalid call to imread.  Correct usage is:

-- [IMG, MAP, ALPHA] = imread (FILENAME)
-- [...] = imread (URL)
-- [...] = imread (..., EXT)
-- [...] = imread (..., IDX)
-- [...] = imread (..., PARAM1, VALUE1, ...)
….


In the first call, Octave recognizes temp.imread as the file in
c:\data\+temp\imread.mex,
but in the second call, Octave calls its own imread. 
 
This is a regression wrt 4.2.1.





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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