From dbb9acafef8927ee2e44b01fea8a8d1aae52cc93 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 1 Dec 2013 16:57:14 +0100 Subject: [PATCH] object: Be more specific about requirements for the 'destroy' callback. --- src/include/core/object.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. * -- 2.30.2