From 88e10da36b00291b399c2d9bfe5f266a44a40f6f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 2 Nov 2017 17:59:17 +0900 Subject: [PATCH] cxx: Mark wref::lock as const This allows passing in wref to a lambda. If we passed normal refs, we would end up with dangling references and many ERR messages. --- src/bindings/cxx/eo_cxx/eo_wref.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/cxx/eo_cxx/eo_wref.hh b/src/bindings/cxx/eo_cxx/eo_wref.hh index 048ffca..e0f9c7b 100644 --- a/src/bindings/cxx/eo_cxx/eo_wref.hh +++ b/src/bindings/cxx/eo_cxx/eo_wref.hh @@ -79,7 +79,7 @@ struct wref /// strong reference to the EO Object. Otherwise it returns /// an empty eina::optional. /// - eina::optional lock() + eina::optional lock() const { if(_eo_wref) // XXX eo_ref() should work on multi-threaded environments { -- 2.7.4