]> git.ipfire.org Git - thirdparty/pdns.git/commit
Overload operator -> to return a LuaContext* 11319/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 14 Feb 2022 12:08:02 +0000 (13:08 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 14 Feb 2022 13:12:42 +0000 (14:12 +0100)
commit0b1bb97e390694f9b8579e6828aac8fb23a39e63
treea52b24905db440cbb8d348a5a725d8f04d8161ef
parent0e933ef0c4777f6038ec5a813025301f07c71876
Overload operator -> to return a LuaContext*

@rgacogne suggested to return a LuaContext&, but AFAIKS that won't
fly because if the rescriction mentioned in
https://en.cppreference.com/w/cpp/language/operators:

The overload of operator -> must either return a raw pointer, or
return an object (by reference or by value) for which operator ->
is in turn overloaded.

As LuaContext has no -> operator, we must return a raw pointer.
pdns/rec-lua-conf.cc