summaryrefslogtreecommitdiff
path: root/Lib/octave
Commit message (Collapse)AuthorAgeFilesLines
* Correct new Raise functions to be staticWilliam S Fulton2022-10-141-1/+1
|
* Move SWIG_Octave_Raise into a functionWilliam S Fulton2022-09-191-2/+9
| | | | For efficiency and to fix some warnings
* Javascript, Octave, R - Improve exceptions for %catchesWilliam S Fulton2022-09-191-1/+1
| | | | | | | | | and exception specifications for native types. Now the raised exception contains the string value as the exception message instead of just the C/C++ type of the exception. R exceptions were completely swallowed beforehand
* Add missing typecheck typemaps for std::auto_ptr and std::unique_ptrWilliam S Fulton2022-09-172-0/+12
| | | | To fix overloading when using these types.
* Provide SWIGTYPE MOVE typemaps in swigmove.iWilliam S Fulton2022-09-161-0/+1
| | | | | | | | | | | | For implementing full move semantics when passing parameters by value. Based on SWIGTYPE && and std::unique_ptr typemaps which implement move semantics. Added for all languages, but untested for: Go, Ocaml, R, Scilab (and unlikely to be fully functional for same reasons as for std::unique_ptr support). Issue #999
* Octave - SWIG now marshalls a C/C++ NULL pointer into the null matrix, []William S Fulton2022-08-311-4/+7
| | | | | | | SWIG has always marshalled the null matrix into a NULL pointer; this remains and now we have consistency in representing a NULL pointer. This is a pre-requisite for a pending commit to fully support std::unique_ptr.
* Add Octave support for std::unique_ptr and std::auto_ptrWilliam S Fulton2022-08-023-18/+105
| | | | Equivalent to Ruby/Python implementations.
* Improve #include guard macrosOlly Betts2022-07-191-3/+3
| | | | | | | Avoid using reserved identifiers such as `_DOHINT_H` (fixes #1989), fix cases where the name doesn't match the filename, and make the naming more consistent and less likely to collide with include guards in other headers.
* More move semantics improvementsWilliam S Fulton2022-07-041-2/+2
| | | | | More removal of casts in the out typemaps when copying objects to enable C++ compilers to possibly make use of move semantics.
* Performance optimisation for directors for classes passed by valueWilliam S Fulton2022-07-041-1/+1
| | | | | | | The directorin typemaps in the director methods now use std::move on the input parameter when copying the object from the stack to the heap prior to the callback into the target language, thereby taking advantage of move semantics if available.
* Better Octave typecheck for argc argv typemapsWilliam S Fulton2022-05-231-4/+15
|
* Add Octave argcargv.iErez Geva2022-05-211-0/+33
| | | | Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
* Fixed octave version check and enabled VPATH build for check-octave-operator ↵Markus Friedrich2022-01-161-1/+1
| | | | example
* Merge remote-tracking branch 'origin/master' into HEADMarkus Friedrich2022-01-168-159/+290
|\
| * Additional changes due to name changes in octave-6 * is_map to isstruct, ↵Robert Fries2021-12-051-0/+18
| | | | | | | | is_object to isobject
| * Octave module lets examples and tests work with Octave-6 * Try-catch ↵Robert Fries2021-12-053-9/+83
| | | | | | | | replacement for check of error_state * Add execute method in addition to call * Replace oct_mach_info with octave::mach_info * Call from interpreter: global_varval global_assign * Assign a global name requires locating the stack which requires interpreter to tree evaluator to callStack * Do not use discard_error_messages or discard_warning_messages
| * Allow swig wrapped modules to compile with -BsymbolicRobert Fries2021-12-052-0/+10
| |
| * Fix typosDimitris Apostolou2021-11-171-1/+1
| |
| * 0.0 float warning fixWilliam S Fulton2020-10-101-1/+1
| |
| * octrun.swg: ensure type_id() is set correctlyKarl Wette2020-05-311-3/+14
| |
| * Octave: use pre-compiled headers to speed up test suite, if supportedKarl Wette2020-05-317-122/+136
| |
| * octruntime.swg: do not use atexit() to quit OctaveKarl Wette2020-05-311-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - This reverts commit 931656bcbe7c2bf37bb5d831b47fab9a38695e91 - Since atexit() does not pass along the desired exit status, __swig_atexit__() always exits with status zero, regardless of whether Octave completed successfully or raised an error. - This means the success/failure of Octave scripts which load SWIG modules cannot be determined by other programs, which makes them unusable. - Instead, provide a Octave function swig_exit() which calls ::_Exit() with a given exit status. This way at least a clean exit from Octave can be guaranteed for future versions if the seg-fault problem is not fixed.
| * octrun.swg: remove octave_value type-id from octave_swig_bound_funcKarl Wette2020-05-312-11/+0
| | | | | | | | | | | | | | | | | | | | - The {DECLARE|DEFINE}_OV_TYPEID_FUNCTIONS_AND_DATA declarations attached to this class cause a seg-fault in the module_load Octave example. Removing these declarations fixes the seg-fault. - While cause of seg-fault is unknown, note that (in Octave 5.1.0) the declaration of octave_function, which is the base class for octave_swig_bound_func, does not use these declarations. So it's possible they simply are not required for this type of subclass.
| * Changed return type of swig_this() to size_t.Markus Friedrich2019-12-241-3/+3
| | | | | | | | | | | | The type long may be 4 bytes but swig_this() must return the address of the object as an integer. Using size_t ensures that the return type can store a pointer.
* | Bugfix for octave 4.4Markus Friedrich2019-11-241-0/+5
|/ | | | | | | | | | | With octave 4.4 the function virtual bool octave_base_value::is_object() const was renamed to virtual bool octave_base_value::isobject() const As noted in CHANGES "2012-03-26: xavier98", is_object() must return true for swig types whereas octave_base_value::is_object returns false per default.
* Python STL container method overloading fixWilliam S Fulton2019-08-061-8/+2
| | | | | Fix method overloading of methods that take STL containers of different types. Due to some error handling that was not cleared during typehecking.
* Fix format-security error with octave 5.1Orion Poplawski2019-03-101-2/+2
|
* Add missing parameter names in STL container wrappersWilliam S Fulton2019-02-132-2/+2
| | | | | | | Mostly in STL copy constructors. Best to have parameter names as they make their way into the wrappers in some target languages.
* Create a consistent stl.i library fileWilliam S Fulton2019-02-121-1/+5
| | | | | Same file now for all languages except R which is still missing std_map.i. Recent Java changes adding in std_set.i removed.
* Fix overloading for non-pointers and NULL - OctaveWilliam S Fulton2018-12-301-1/+1
|
* Misc. typosluz.paz2018-05-171-1/+1
| | | found via `codespell` and `grep`
* Lib/octave: fix getting/setting global variables for Octave >= 4.4Karl Wette2018-05-121-0/+17
|
* Lib/octave: use new class for function member dereference with Octave >= 4.4Karl Wette2018-05-122-4/+106
|
* Lib/octave: fix operator installation for Octave >= 4.4Karl Wette2018-05-121-0/+18
|
* Lib/Octave: in Octave >= 4.4, assign reference to base class in subclassKarl Wette2018-05-121-0/+4
| | | | | | | | | - See Examples/octave/callback/runme.m: a.run() calls Octave callback, but due to changes in behaviour to subsref() a.Callback.run() can no longer be used to call C callback unless a.Callback actually exists; subsrefs() just gets the "Callback" call whereas prior to Octave 4.4 it would get both the "Callback" and "run" calls. So now a.Callback is set to the original base class (with own=0) so that it can be accessed
* Lib/octave: fix call to mlock() for Octave >= 4.4Karl Wette2018-05-121-3/+5
|
* Lib/octave: fix call to octave::call_stack::current() for Octave >= 4.4Karl Wette2018-05-121-0/+5
|
* Lib/octave: 'octave_exit' not longer exists in Octave >= 4.4Karl Wette2018-05-121-1/+5
| | | | | - Instead must register atexit() function, since Octave still cannot clean up its memory usage on exit with SWIG modules
* Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4Karl Wette2018-05-121-0/+4
|
* Lib/octave: replace is_numeric_type() with isnumeric() for Octave >= 4.4Karl Wette2018-05-121-0/+4
|
* Lib/octave: replace is_cell() with iscell() for Octave >= 4.4Karl Wette2018-05-124-5/+43
|
* Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4Karl Wette2018-05-121-0/+12
|
* Lib/octave: fix function name passed to unwind_protect::begin_frame()Karl Wette2018-05-121-1/+1
|
* Cosmetic syntax tweak using throw in Octave directorsWilliam S Fulton2018-05-041-3/+3
|
* std_basic_string.i fixesWilliam S Fulton2018-01-041-36/+11
| | | | | | - Remove python code from octave's std_basic_string.i - Correctly return an error to fix error handling when using std::basic_string in overloaded methods - issue #1171.
* Changes to use common DirectorException classWilliam S Fulton2017-11-291-2/+18
| | | | | | | | | | Add director.swg for Go as was completely absent. This is just the start of a common exception handling approach to directors. An exception thrown in a Java director method will be propogated back to Java via a C++ DirectorException. DirectorException throws typemap for Java is fully working, all other languages need work. DirectorException throws typemap for Perl added just to fix compilation errors. Add director_exception_catches test.
* Enhancements for directorin typemapsWilliam S Fulton2017-10-161-29/+29
| | | | | | | | | The directorin typemaps will now generate a temporary variable (specified after the type), such as: %typemap(directorin) MyType (MyType *temp) { ... use temp ... } The shared_ptr director typemaps have been fixed for use in functions that take more than one parameter.
* Director shared_ptr typemaps for scripting languagesWilliam S Fulton2017-10-131-0/+82
| | | | | | | Modify the Python and Ruby director shared_ptr typemaps to be language neutral. Port the director modifications to other scripting languages that have shared_ptr support - Octave, R and Scilab. Scilab shared_ptr support is not fully working and needs work though.
* Scilab, R and Octave shared_ptr typemaps null fixWilliam S Fulton2017-10-111-4/+3
| | | | | Merge changes from Python/Ruby equivalent files to obtain a fix for NULL handling of T*const& typemaps.
* Octave and R shared_ptr typemaps updateWilliam S Fulton2017-10-111-4/+13
| | | | | Synchronize typemaps with other identical typemaps in Scilab/Ruby. Adds some missing $disown support.