Skip to content

Commit

Permalink
Add Ractor support to Coordinate, GPS, and NavigationModel
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrir-naru committed Dec 20, 2024
1 parent 7b245b2 commit 42f7f5f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tool/swig/Coordinate.i
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@

%feature("autodoc", "1");

%init %{
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif
%}

%define MAKE_SETTER(name, type)
%rename(%str(name ## =)) set_ ## name;
type set_ ## name (const type &v) {
Expand Down
6 changes: 6 additions & 0 deletions tool/swig/GPS.i
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ inline std::string to_string(const T &value){
%include exception.i
%include std_except.i

%init %{
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif
%}

#if !defined(SWIGIMPORTED)
%exceptionclass native_exception;
%typemap(throws,noblock=1) native_exception {
Expand Down
6 changes: 6 additions & 0 deletions tool/swig/NavigationModel.i
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@

%feature("autodoc", "1");

%init %{
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif
%}

%define CONCRETIZE(type)
%template(MagneticField) MagneticFieldGeneric<type>;
%template(IGRF11) MagneticFieldGeneric2<type, IGRF11Generic>;
Expand Down

0 comments on commit 42f7f5f

Please sign in to comment.