{"id":2496,"url":"https://patchwork.libcamera.org/api/1.1/covers/2496/?format=json","web_url":"https://patchwork.libcamera.org/cover/2496/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200104050947.7673-1-laurent.pinchart@ideasonboard.com>","date":"2020-01-04T05:09:33","name":"[libcamera-devel,00/14] object: Propagate return value of invoked method","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/2496/mbox/","series":[{"id":600,"url":"https://patchwork.libcamera.org/api/1.1/series/600/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=600","date":"2020-01-04T05:09:33","name":"object: Propagate return value of invoked method","version":1,"mbox":"https://patchwork.libcamera.org/series/600/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/2496/comments/","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 229FC60461\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jan 2020 06:10:03 +0100 (CET)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 919B330F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jan 2020 06:10:02 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578114602;\n\tbh=etUKd73dg3BHHxCct6e/LxtE8Zc3aky3WuHk276PLbs=;\n\th=From:To:Subject:Date:From;\n\tb=j15yVwOxDf2QWGxqO+DmCxUkWJAyRceSUg70SEhz1Nd3RNnYE8f7RQwGEuK9WDiMq\n\t8jsTq2PjWpijVQexrrvg0Pp2hW14bgImCpNPomJ7LgB/ZNVRPwXRDFhErOfvcfXF/e\n\tlv+uhxxv2agk4W7o4WFy0z2x/9IFs0YxpstWhFMw=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sat,  4 Jan 2020 07:09:33 +0200","Message-Id":"<20200104050947.7673-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.24.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 00/14] object: Propagate return value of\n\tinvoked method","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 04 Jan 2020 05:10:03 -0000"},"content":"Hello,\n\nThis patch series implements support for propagating the return value of\ninvoked method all the way to the caller of Object::invokeMethod(). The\nchange is motivated by the recently merged V4L2 compatibility layer that\nworks around this missing feature using function arguments to pass a\npointer to the return value.\n\nThe individual patches should be pretty self-explicit. It's worth noting\nthat patch 03/14 fixes a memory leak that I noticed while developing\nthis. Patch 14/14 shows how the new feature simplifies the V4L2\ncompatibility layer.\n\nLaurent Pinchart (14):\n  test: object-invoke: Test direct invocation\n  libcamera: object: Use activate() in invokeMethod()\n  libcamera: bound_method: Fix memory leak with direct connections\n  libcamera: bound_method: Mark overriden methods with override\n  libcamera: bound_method: Drop unused BoundMethodBase::connectionType()\n  libcamera: bound_method: Move sequence and generator to\n    BoundMethodBase\n  libcamera: bound_method: Store method arguments in a class\n  libcamera: bound_method: Support bindings to non-void methods\n  libcamera: bound_method: Manage BoundMethodPack through\n    std::shared_ptr\n  libcamera: bound_method: Propagate method return value\n  libcamera: bound_method: Rename Bound*Method to BoundMethod*\n  test: object-invoke: Test invoking a non-void method\n  test: signal: Test connecting to non-void slots\n  libcamera: v4l2: Use Object::invokeMethod() return value\n\n Documentation/Doxyfile.in        |   8 +-\n include/libcamera/bound_method.h | 178 ++++++++++++++++++++++++-------\n include/libcamera/object.h       |  13 +--\n include/libcamera/signal.h       |  39 +++----\n src/libcamera/bound_method.cpp   |  28 ++++-\n src/libcamera/include/message.h  |   5 +-\n src/libcamera/message.cpp        |   5 +-\n src/libcamera/object.cpp         |   6 +-\n src/libcamera/signal.cpp         |   8 +-\n src/v4l2/v4l2_camera.cpp         | 109 +++++++++----------\n src/v4l2/v4l2_camera.h           |  18 ++--\n src/v4l2/v4l2_camera_proxy.cpp   |  51 +++++----\n test/object-invoke.cpp           |  35 ++++++\n test/signal.cpp                  |  17 +++\n 14 files changed, 344 insertions(+), 176 deletions(-)"}