Code

object: Be more specific about requirements for the 'destroy' callback.
authorSebastian Harl <sh@tokkee.org>
Sun, 1 Dec 2013 15:57:14 +0000 (16:57 +0100)
committerSebastian Harl <sh@tokkee.org>
Sun, 1 Dec 2013 15:57:14 +0000 (16:57 +0100)
src/include/core/object.h

index 3c00fb51abe807d00799d931278e2d5dddc8ffd6..9169c441383b292803a67efc35e91147528aa1e2 100644 (file)
@@ -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.
  *