From 9cd7dd68a851b501c44ade003b03ee177ed2c770 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 31 Oct 2022 14:20:18 -0500 Subject: [PATCH] Wrap vector in Swig mappings, and enable thread-safe access to swig wrappers - so our long running waveformer does not block the Python GIL --- bindings/python/openshot.i | 3 ++- bindings/ruby/openshot.i | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bindings/python/openshot.i b/bindings/python/openshot.i index f01cef74..10cb8866 100644 --- a/bindings/python/openshot.i +++ b/bindings/python/openshot.i @@ -9,7 +9,7 @@ // // SPDX-License-Identifier: LGPL-3.0-or-later -%module openshot +%module("threads"=1) openshot /* Suppress warnings about ignored operator= */ %warnfilter(362); @@ -45,6 +45,7 @@ %template() std::map; %template() std::pair; %template() std::vector; +%template() std::vector; %template() std::pair; %template() std::pair; %template() std::pair; diff --git a/bindings/ruby/openshot.i b/bindings/ruby/openshot.i index cf3c4778..debeeec5 100644 --- a/bindings/ruby/openshot.i +++ b/bindings/ruby/openshot.i @@ -9,7 +9,7 @@ // // SPDX-License-Identifier: LGPL-3.0-or-later -%module openshot +%module("threads"=1) openshot /* Suppress warnings about ignored operator= */ %warnfilter(362); @@ -45,6 +45,7 @@ %template() std::map; %template() std::pair; %template() std::vector; +%template() std::vector; %template() std::pair; %template() std::pair; %template() std::pair;