From 7dc9a9674120fa8be2fc33e627211b515475207f Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Sun, 26 May 2019 10:16:10 -0400 Subject: Deprecate foo_new_clone() in favor of foo_clone() Consistency between const and non-const args for clone functions --- doc/Doxyfile.cmake | 3 ++- doc/UsingLibical.md | 15 ++++++++------- doc/UsingLibical.txt | 14 ++++++++------ 3 files changed, 18 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/Doxyfile.cmake b/doc/Doxyfile.cmake index 54981ef1..6e2d5e39 100644 --- a/doc/Doxyfile.cmake +++ b/doc/Doxyfile.cmake @@ -160,7 +160,8 @@ PREDEFINED = LIBICAL_ICAL_EXPORT="" \ LIBICAL_VCAL_EXPORT="" \ LIBICAL_ICAL_NO_EXPORT="" \ LIBICAL_ICALS_NO_EXPORT="" \ - LIBICAL_VCAL_NO_EXPORT="" + LIBICAL_VCAL_NO_EXPORT="" \ + LIBICAL_DEPRECATED= EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- diff --git a/doc/UsingLibical.md b/doc/UsingLibical.md index 5ef6457f..0655a3a9 100644 --- a/doc/UsingLibical.md +++ b/doc/UsingLibical.md @@ -1225,13 +1225,14 @@ caller owns and must free, and some of the memory is managed by the library. Here is a summary of the memory rules. 1. If the function name has "new" in it (such as `icalcomponent_new()`, - or `icalpropert_new_clone()`), the caller gets control - of the memory. - -2. If you got the memory from a routine with new in it, you must - call the corresponding `*_free()` routine to free the memory, for - example use `icalcomponent_free()` to free objects created with - `icalcomponent_new()`) + or `icalproperty_new_from_string()`), the caller gets control + of the memory. The caller also gets control over an object that is + cloned via a function that ends with "_clone" (like `icalcomponent_clone()`) + +2. If you got the memory from a routine with "clone" or "new" in it, you + must call the corresponding `*_free()` routine to free the memory, + for example use `icalcomponent_free()` to free objects created with + `icalcomponent_new()` or `icalcomponent_clone()` 3. If the function name has "add" in it, the caller is transferring control of the memory to the routine, for example the function diff --git a/doc/UsingLibical.txt b/doc/UsingLibical.txt index ab409697..9eb73ce1 100644 --- a/doc/UsingLibical.txt +++ b/doc/UsingLibical.txt @@ -1146,12 +1146,14 @@ caller owns and must free, and some of the memory is managed by the library. Here is a summary of the memory rules. 1) If the function name has "new" in it (such as icalcomponent_new(), - or icalpropert_new_clone()), the caller gets control - of the memory. - -2) If you got the memory from a routine with new in it, you must - call the corresponding *_free routine to free the memory. ( Use - icalcomponent_free() to free objects created with icalcomponent_new()) + or icalproperty_new_from_string()), the caller gets control of the + memory. The caller also gets control over an object that is cloned via + a function that ends with "_clone" (like icalcomponent_clone()) + +2) If you got the memory from a routine with "clone" or "new" in it, you + must call the corresponding *_free() routine to free the memory, for + example use icalcomponent_free() to free objects created with + icalcomponent_new() or icalcomponent_clone(). 3) If the function name has "add" in it, the caller is transferring control of the memory to the routine. ( icalproperty_add_parameter() ) -- cgit v1.2.1