protocol: Add explicit nullable types
authorChristopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Mon, 2 Jul 2012 10:03:30 +0000 (20:03 +1000)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 2 Jul 2012 17:53:02 +0000 (13:53 -0400)
commit161c690b558fff9d0f407311ae4e1fbe389775f7
treed09812a18f9c6e198732d10034040bf641ac4c85
parentd2bcffc470cf37dbdeb4d1ed46819360c16d92eb
protocol: Add explicit nullable types

Most of the time it does not make sense to pass a NULL object, string, or array
to a protocol request. This commit adds an explicit “allow-null” attribute
to mark the request arguments where NULL makes sense.

Passing a NULL object, string, or array to a protocol request which is not
marked as allow-null is now an error. An implementation will never receive
a NULL value for these arguments from a client.

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
src/connection.c
src/scanner.c
tests/connection-test.c