From 3037dba80d888a0322d8ebf4e9728800fc314275 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 12 Feb 2017 01:11:41 +0200 Subject: [HACK] py: Expose Videomode::to_blob method Returning the blob through an std::unique_ptr<> causes issues with pybind11. Return the blob pointer directly as a workaround while the root cause is investigated and fixed. Signed-off-by: Laurent Pinchart --- kms++/src/videomode.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kms++/src') diff --git a/kms++/src/videomode.cpp b/kms++/src/videomode.cpp index 4964a57..98754e0 100644 --- a/kms++/src/videomode.cpp +++ b/kms++/src/videomode.cpp @@ -10,11 +10,12 @@ using namespace std; namespace kms { -unique_ptr Videomode::to_blob(Card& card) const +Blob *Videomode::to_blob(Card& card) const { drmModeModeInfo drm_mode = video_mode_to_drm_mode(*this); + Blob *blob = new Blob(card, &drm_mode, sizeof(drm_mode)); - return unique_ptr(new Blob(card, &drm_mode, sizeof(drm_mode))); + return blob; } float Videomode::calculated_vrefresh() const -- cgit v1.2.3