From 7bcc40f13f90139ab971590510a2c64dd77d9f1d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 28 Feb 2019 14:01:27 -0800 Subject: [PATCH] ircd::m: Fix count_since prototype; upgrade definition. --- ircd/m.cc | 12 ++++++------ modules/m_room.cc | 9 +++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ircd/m.cc b/ircd/m.cc index d074d7e81..a565c2703 100644 --- a/ircd/m.cc +++ b/ircd/m.cc @@ -3753,16 +3753,16 @@ ircd::m::count_since(const room &r, const event::idx &a, const event::idx &b) { - using prototype = bool (const room &, - const event::idx &, - const event::idx &); + using prototype = size_t (const room &, + const event::idx &, + const event::idx &); - static mods::import _count_since + static mods::import call { - "m_room", "count_since" + "m_room", "ircd::m::count_since" }; - return _count_since(r, std::min(a, b), std::max(a, b)); + return call(r, std::min(a, b), std::max(a, b)); } ircd::m::id::room::buf diff --git a/modules/m_room.cc b/modules/m_room.cc index 718a7e0fa..3b862648e 100644 --- a/modules/m_room.cc +++ b/modules/m_room.cc @@ -52,10 +52,11 @@ ircd::m::send(const m::room &room, return commit(room, event, content); } -extern "C" size_t -count_since(const m::room &room, - const m::event::idx &a, - const m::event::idx &b) +size_t +IRCD_MODULE_EXPORT +ircd::m::count_since(const m::room &room, + const m::event::idx &a, + const m::event::idx &b) { m::room::messages it {