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

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

[Octave-bug-tracker] [bug #39058] Unecpected behavior from mexPutVariabl


From: anonymous
Subject: [Octave-bug-tracker] [bug #39058] Unecpected behavior from mexPutVariable
Date: Thu, 23 May 2013 22:21:51 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; MathPlayer 2.10a; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C; .NET4.0E)

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

                 Summary: Unecpected behavior from mexPutVariable
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 23 May 2013 10:21:50 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: Kory Donati
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.4
        Operating System: Any

    _______________________________________________________

Details:

I think the mex function mexPutVariable is not working correctly, specifically
when the desired workspace is set to "caller" and the mex file is called from
within a function. If an mxArray is passed to the "caller" workspace from
mexPutVariable, it is actually passed to one level above the caller.

In the attached example, the mex source file simple_array.c creates an array
to pass to the caller's workspace. If compiled using: "mkoctfile --mex
simple_array.c" and executed: "simple_array" from the command line, the
variable out_caller appears in the workspace as expected, verified using
"whos". 

However, if the mex file is called within a m-file function(see run_me.m),
then the variable is not pased to the caller, but to the base workspace. This
can be seen in the attached run_me.m file. I expect to see the who list called
in run_me.m to return OUT_caller.

command line calls in order:
mkoctfile --mex simple_array.c
run_me
%whos output shows nothin in run_me workspace.
whos
%output from comand line shows variable out_caller



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 23 May 2013 10:21:50 PM UTC  Name: simple_array.c  Size: 670B   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=28152>
-------------------------------------------------------
Date: Thu 23 May 2013 10:21:50 PM UTC  Name: run_me.m  Size: 59B   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=28153>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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