diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2017-02-12 01:11:41 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2017-02-12 17:01:38 +0200 |
commit | 3037dba80d888a0322d8ebf4e9728800fc314275 (patch) | |
tree | ba2995cd531f81214a44ba900f2f14bcd568d4be /kms++/src | |
parent | e96a0e9b7aecc5c3b3cc3fbf705a0942bf105c9e (diff) |
[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 <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'kms++/src')
-rw-r--r-- | kms++/src/videomode.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<Blob> 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<Blob>(new Blob(card, &drm_mode, sizeof(drm_mode))); + return blob; } float Videomode::calculated_vrefresh() const |