[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50116] libinterp functions should call C++ di
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #50116] libinterp functions should call C++ directly rather than calling through feval |
Date: |
Tue, 24 Jan 2017 08:52:58 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 |
Follow-up Comment #1, bug #50116 (project octave):
A remedy could be the following pattern to refactor the code:
Before:
octave_value_list in;
in(0) = matrix_A;
in(1) = matrix_B;
octave_value_list result = octave::feval ("isequal", args, 1);
After:
#include "builtin-defun-decls.h"
...
octave_value_list in;
in(0) = matrix_A;
in(1) = matrix_B;
octave_value_list result = Fisequal (args, 1);
The remedy is inspired by "examples/code/standalonebuiltin.cc". This compiles
for me (I am currently working on bug #50105 but decided to post here for
generality). Now I want to know if this approach is desired and what does the
"1" in the end of Fisequal (args, 1) mean? In
"libinterpreter/builtin-defun-decls.h" it is "0" by default. Is there any
documentation available? The file "libinterpreter/builtin-defun-decls.h" is
generated by the undocumented "build-aux/mk-builtins.pl".
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50116>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/