From: Sebastian Harl Date: Sun, 1 Dec 2013 15:57:14 +0000 (+0100) Subject: object: Be more specific about requirements for the 'destroy' callback. X-Git-Tag: sysdb-0.1.0~339 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dbb9acafef8927ee2e44b01fea8a8d1aae52cc93;p=sysdb.git object: Be more specific about requirements for the 'destroy' callback. --- diff --git a/src/include/core/object.h b/src/include/core/object.h index 3c00fb5..9169c44 100644 --- a/src/include/core/object.h +++ b/src/include/core/object.h @@ -78,7 +78,9 @@ typedef struct { * * The init function will be called with the remaining arguments passed to * sdb_object_create. If the init function fails (returns a non-zero value), - * the object will be destructed and destroyed. + * the object will be destructed and destroyed. In this case, the 'destroy' + * callback may be called on objects that were only half-way initialized. The + * callback has to handle that case correctly. * * The reference count of the new object will be 1. *