]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
module API+ABI: remove one level of indirection
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 14 Mar 2019 12:09:48 +0000 (13:09 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Wed, 17 Apr 2019 16:44:29 +0000 (16:44 +0000)
commit176b1c282a54b2547b5795238120e842fcaeb6bd
tree984a4d1a1b9f347ee6daf344d8dd2a1d13ee0d74
parent4024fcfcc0e30f37159d9e98b3870dbc095169e6
module API+ABI: remove one level of indirection

... for layers and props.  This breaks C module API+ABI.

It seemed weird to repeatedly call a function that returns a pointer
to a structure in which we find the function we want to actually call.
We've never used changing these functions AFAIK, and the target
functions could easily be written to change their behavior instead
(i.e. move the indirection *inside* the function).

When breaking this, I also removed these two (_layers and _props)
from the dynamic symbols (to be) exported from the C modules.
They always pointed to memory belonging inside the module,
and they seem quite sensible to be set up by the _init symbol instead.
17 files changed:
daemon/engine.c
daemon/ffimodule.c
lib/layer/cache.c
lib/layer/iterate.c
lib/layer/validate.c
lib/module.c
lib/module.h
lib/resolve.c
lib/utils.c
modules/README.rst
modules/bogus_log/bogus_log.c
modules/cookies/cookies.c
modules/dnstap/dnstap.c
modules/edns_keepalive/edns_keepalive.c
modules/hints/hints.c
modules/nsid/nsid.c
modules/stats/stats.c