Commit Graph

91 Commits

Author SHA1 Message Date
William S Fulton 7c478b5e17 Note the LENGTH STRING typemap changes and tidy up 2025-07-28 23:02:52 +01:00
Erez Geva cb68446ece Fix Length & string reverse order typemap.
And add it to missing languages: C#, Java, Lua, PHP.

Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
2025-07-28 17:07:42 +02:00
William S Fulton 7fb816dcb2 typo fix in docs 2024-11-04 23:20:43 +00:00
William S Fulton e6c9634c7d html fixes 2024-10-04 22:20:43 +01:00
Egor Konovalov 47034b1bdc
Fix typo in the documentation (#3042) 2024-10-01 18:37:34 +01:00
Olly Betts d3507febaa Document %shared_ptr/%unique_ptr incompatibility
Closes #3025
2024-09-28 15:08:05 +12:00
William S Fulton a9784d98ec C chapter added, HTML corrections
Added C to experimental target languages section
Usual html fixes and heading updates after running make
2024-09-16 19:51:37 +01:00
Olly Betts 31eed9210b Document complex.i in the manual
Fixes #2560
2024-09-16 12:49:46 +12:00
William S Fulton 9bf4842002 C++ reference errors when passing in a 'NULL' change of behaviour.
Most languages now use "NullReferenceError" in the error message
where they previously used "ValueError". Also exception changes:

Guile:    "swig-null-reference-error" instead of "swig-value-error"
MzScheme: "swig-null-reference-error" instead of "swig-value-error"
PHP:      zend_ce_type_error instead of zend_ce_value_error
Python:   Consistently raises TypeError instead of a mix of ValueError
          and TypeError.
Ruby:     Consistently raises NullReferenceError instead of a mix of
          ArgumentError and NullReferenceErrorError.

The consistent raising of a TypeError instead of ValueError for Python
ensures that incorrectly passing 'None' into a C++ reference argument
will correctly convert the error into a NotImplemented error for
the rich comparisons implementations per PEP 207. Fixes #2987

Note that the li_constraints checking implementation for the NONNULL
typemap for pointers also makes the same error change from
SWIG_ValueError to SWIG_NullReferenceError.

The D typemaps use SWIG_DNullReferenceException instead of
SWIG_DIllegalArgumentException, although this ultimately has no change
as the same D Exception is still thrown.
2024-09-14 13:03:36 +01:00
William S Fulton ba9b0a35ab Merge branch 'char_binary_java_fix-tidyup'
* char_binary_java_fix-tidyup:
  Move SWIGStringWithLengthHelper to csharphead.swg
  cdata whitespace/cosmetic fixups
  cdata doc updates
  Rename `typemaps/cdata_struct.swg` to `typemaps/cdata_begin.swg`. And `typemaps/cdata.swg` to `typemaps/cdata.swg`. Move `cdata_apply.swg` content to `typemaps/cdata.swg`.
  Group the C# marshalling of STRING-LENGTH typemap  into C# class named SWIGStringWithLengthHelper.
  Leave Length & string reverse order typemap in typemaps/strings.swg
  Support old C# as "LPUTF8Str" was add in 2017.
  Improve documentation. Follow @wsfulton reviews.
  Use a dummy for MzScheme and untested OCaml cdate. To prevent compilation error.
  Further fixing follow reviews.
  Reorganise raw data typemap,  so typemaps folder contain only common part. Improve document.
  Inline SWIG_string_to_utf8_bytes SWIG_utf8_bytes_to_string code
  Fixes of STRING/BYTES LENGTH typemaps.

 Conflicts:
	CHANGES.current
2024-06-13 10:53:19 +01:00
William S Fulton ea2380d52a cdata doc updates
The cdata.i docs in C#, Java, D, Go had a confusing mix of target language
and C declarations. Improve the main cdata documentation in Library.html instead.
2024-06-07 08:27:15 +01:00
William S Fulton 2a02238883 Move Stable ABI to more sensible section and update html sectioning 2024-03-25 07:52:50 +00:00
Erez Geva 53a6c691c7 Improve documentation.
Follow @wsfulton reviews.

Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
2024-03-10 00:17:22 +01:00
William S Fulton 24a66e6125 Add const std::unique_ptr & input typemaps 2024-03-06 21:46:58 +00:00
William S Fulton 846b40793e Add non-const std::unique_ptr & input typemaps 2024-03-06 21:46:58 +00:00
William S Fulton 5712ce6464 std::unique_ptr return by reference typemaps added 2024-03-06 21:46:58 +00:00
William S Fulton 3f1e40d2f4 Add std::unique_ptr && output typemaps
Move semantics are not supported by default.
They behave as if a lvalue reference was returned.
2024-03-06 21:46:58 +00:00
William S Fulton ae22a97f1b Movable std::unique_ptr - add std::unique_ptr && typemaps
Closes #2650
2024-03-06 21:46:58 +00:00
Erez Geva affbd5893d Reorganise raw data typemap,
so typemaps folder contain only common part.
Improve document.

Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
2024-02-29 11:58:05 +01:00
Erez Geva 1bf59e0bbc Fixes of STRING/BYTES LENGTH typemaps.
Fix Java STRING LENGTH typemap.
Use string type in static typed languages (Java, C#, D and Go).

Add BYTES LENGTH typemap and apply it for binary data.
Use byte type in static typed languages.

Add li_cdata_cpp, li_cdata and char_binary
 tests for most of languages(apart from R and experimental).

Fix the director_binary_string test and add it to C#, D, Go,
 Perl, PHP, Python, Ruby and octave.

Update documents.

Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
2024-02-29 02:09:09 +01:00
Olly Betts 0d80357cea Document directorout std::string_view limitations
See #1567
2023-12-21 14:11:23 +13:00
Olly Betts 7d4e1cd629 Fix minor typos in manual 2023-10-16 11:11:21 +13:00
William S Fulton ecaa052f3d carrays.i library modified to use size_t instead of int
in the %array_functions and %array_class macros.

Affects C#, D, Go, Guile, Java, Javascript, Lua, Ocaml, R, Racket.
Closes #1680

If the old types are required for backwards compatibility, use %apply to
restore the old types as follows:

  %include "carrays.i"
  %apply int { size_t nelements, size_t index }
  ... %array_functions and %array_class ...
  %clear size_t nelements, size_t index; # To be safe in case used elsewhere
2023-10-11 08:23:16 +01:00
Olly Betts 6085a9661e Initial support for std::string_view
So far C#, Java, Lua and PHP are supported.

Closes: #2540
See #1567
2023-05-08 15:56:37 +12:00
William S Fulton 3bc754da10 html corrections 2022-07-30 17:42:44 +01:00
William S Fulton 1b63af0f2c std::unique_ptr std::auto_ptr tidyup
Add docs on additional support
Additional testing for invalid usage for parameter inputs
2022-07-19 20:23:06 +01:00
William S Fulton 299880e6a6 Add std::unique support
Simple copy of current auto_ptr support (just suppport for
functions returning std::unique_ptr).

Closes #1722
2022-07-02 16:17:18 +01:00
William S Fulton 6860e2bc03 Document argc argv library 2022-05-15 19:12:39 +01:00
William S Fulton 3bf728f038 HTML fixes 2022-03-12 23:04:24 +00:00
Kris Thielemans bb36862872
add doc on %attribute and templates (#2224)
Document behaviour found in #2142
2022-03-07 06:34:26 +13:00
Dimitris Apostolou 40c3bf30b2 Fix typos 2022-02-10 16:12:24 +13:00
William S Fulton 34d80dcb8b attribute library documentation edits 2022-02-05 20:52:50 +00:00
Corey Minyard 562effb50f Move the attribute.i docs into Library.html
Per comments on the merge request, this is the appropriate place for it,
and add a reference to it from the structures and unions section so
someone looking there will see it.

Also remove the changes in Contents.html, since that is regenerated and
those changes are just noise in the commit.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
2022-01-28 08:59:08 -06:00
William S Fulton b7bcb338cf Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
William S Fulton 7070320335 Revert "Add C++20 documentation chapter"
This reverts commit 36e8d521de.

Conflicts:
	Doc/Manual/R.html
2020-06-08 20:06:55 +01:00
William S Fulton 36e8d521de Add C++20 documentation chapter
[skip-ci]
2020-01-28 20:31:53 +00:00
William S Fulton f3357f1f57 Remove use of std::bind2nd which is removed in C++17 2019-06-27 07:40:49 +01:00
William S Fulton 12a245183f Clear up some confusion over ANSI vs ISO C/C++ support
Issue #890
2019-04-18 20:04:20 +01:00
William S Fulton d16d145787 Documentation section numbering update
[skip ci]
2019-02-11 19:02:03 +00:00
William S Fulton 066c396ad6 Add C++17 documentation chapter 2018-05-14 21:29:46 +01:00
William S Fulton 8e733c0b92 Minor doc enhancement for %array_function 2017-11-02 19:01:18 +00:00
William S Fulton e2679822b1 Doc corrections to make pep8 conformant 2017-11-02 07:41:54 +00:00
William S Fulton 65020645aa Document recent shared_ptr and director updates 2017-10-26 07:46:46 +01:00
William S Fulton ed4b84f4d3 Fix overloading of shared_ptr method overloading
Add 'equivalent' attribute to typecheck typemap.
Closes #1098.
2017-09-23 15:19:34 +01:00
William S Fulton 9671613372 Doc corrections for %shared_ptr and enhancements for %inline 2017-09-15 19:21:26 +01:00
William S Fulton ce96d1b153 Library docs chapter tweaks
- Consistency in heading names
- html fixes
- shared_ptr corrections and add in subheadings
2017-09-15 08:45:39 +01:00
luav f069d0a744 %shared_ptr usage for the templates documented, see #1049 2017-09-11 22:55:13 +02:00
William S Fulton c454f2ce2f Documentation corrections to use targetlang formatting 2017-08-16 00:24:25 +01:00
William S Fulton 10172161bf Update STL library documentation 2017-05-20 15:38:38 +01:00
sunoru 9a6f82ab31 Realign for some comments. 2016-12-31 23:29:45 +08:00