Systemd/src/systemd
Lennart Poettering 151b9b9662 api: in constructor function calls, always put the returned object pointer first (or second)
Previously the returned object of constructor functions where sometimes
returned as last, sometimes as first and sometimes as second parameter.
Let's clean this up a bit. Here are the new rules:

1. The object the new object is derived from is put first, if there is any

2. The object we are creating will be returned in the next arguments

3. This is followed by any additional arguments

Rationale:

For functions that operate on an object we always put that object first.
Constructors should probably not be too different in this regard. Also,
if the additional parameters might want to use varargs which suggests to
put them last.

Note that this new scheme only applies to constructor functions, not to
all other functions. We do give a lot of freedom for those.

Note that this commit only changes the order of the new functions we
added, for old ones we accept the wrong order and leave it like that.
2014-02-20 00:03:10 +01:00
..
_sd-common.h include: make direct includion of _sd-common.h harder 2013-11-20 19:36:14 +01:00
Makefile build-sys: add stub makefiles to subdirs 2012-01-05 16:29:21 +01:00
sd-bus-protocol.h driverd: implement AddMatch/RemoveMatch logic 2013-12-19 04:40:56 +01:00
sd-bus-vtable.h bus: introduce concept of "const" properties 2013-12-22 03:50:52 +01:00
sd-bus.h api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
sd-daemon.h sd-damon is LGPL now 2014-02-19 18:23:14 +01:00
sd-dhcp-client.h sd-dhcp-client: split sd_dhcp_lease from sd_dhcp_client 2014-02-07 15:48:35 +01:00
sd-event.h api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
sd-id128.h bus: rework bloom filter logic to operate with variable bloom filter 2014-01-28 00:57:38 +01:00
sd-journal.h api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
sd-login.h libsystemd-login: add sd_session_get_remote_{host, user} 2013-12-21 22:02:57 -05:00
sd-memfd.h api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
sd-messages.h api: replace manual C++ guards by macros 2013-11-07 16:53:26 +01:00
sd-readahead.h build-sys: merge libsystemd-daemon into libsystemd 2014-02-19 01:09:19 +01:00
sd-resolve.h api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
sd-rtnl.h api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
sd-shutdown.h shutdown: as sd-shutdown.h is a drop-in header it should not include any other headers of ours 2013-11-07 16:53:26 +01:00
sd-utf8.h bus: export utf8 validator calls as pure functions 2013-11-12 00:12:44 +01:00