Skip to content
Snippets Groups Projects
Commit 36eab7d8 authored by Ammar Nejati's avatar Ammar Nejati
Browse files

[a.pyIterableR3] Accept a Python sequence instead of an R3 instance (#111)

Merging branch 'a.pyIterableR3'  into 'main'.

A SWIG `typemap` is added to map a Python sequence to an `R3` instance (`Wrap/Swig/r3_typemap.i`).


Note that this method works only for functions or methods which are _not_ overloaded. Overloaded functions or methods must be _explicitly_ 'extended' in SWIG to accept a Python sequence instead of an `R3` instance.
See <https://www.swig.org/Doc1.3/Typemaps.html#Typemaps_overloading>.

Additionally, the code is improved to avoid copying `R3` arguments when possible.
A const reference is used instead.

Related to issue #111


See merge request !2766
parents eae34820 65ad485a
No related branches found
No related tags found
1 merge request!2766Accept a Python sequence instead of an R3 instance
Pipeline #174208 passed
Showing
with 30 additions and 29 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment