Skip to content

Commit

Permalink
Bindings: Use SWIG shared_ptr for Ruby, also
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Oct 18, 2020
1 parent 5165001 commit ce8512b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions bindings/ruby/openshot.i
Expand Up @@ -46,19 +46,15 @@
/* Unhandled STL Exception Handling */
%include <std_except.i>

namespace std {
template<class T> class shared_ptr {
public:
T *operator->();
};
}
/* Include shared pointer code */
%include <std_shared_ptr.i>

/* Mark these classes as shared_ptr classes */
#ifdef USE_IMAGEMAGICK
%template(SPtrImage) std::shared_ptr<Magick::Image>;
%shared_ptr(Magick::Image)
#endif
%template(SPtrAudioBuffer) std::shared_ptr<juce::AudioSampleBuffer>;
%template(SPtrOpenFrame) std::shared_ptr<openshot::Frame>;
%shared_ptr(juce::AudioSampleBuffer)
%shared_ptr(openshot::Frame)

%{
/* Ruby and FFmpeg define competing RSHIFT macros,
Expand Down

0 comments on commit ce8512b

Please sign in to comment.