Code review comment for lp:~pete-woods/unity-api/add-glib-assigner-class

Revision history for this message
James Henstridge (jamesh) wrote :

One last suggestion: rather than having the user pick an assigner class, how about using a function to create assigner object, so that the type can be inferred?

Taking code from the tests, something like:

    gcharUPtr name;
    g_object_get(obj, "name", assign_to(name), nullptr);

    GErrorUPtr error;
    EXPECT_FALSE(g_key_file_get_boolean(gkf.get(), "group", "key", assign_to(error)));

This should be pretty easy if all the assigner classes are instantiations of the one template.

« Back to merge proposal