SF.net SVN: geany: [1658] trunk/src

ntrel at users.sourceforge.net ntrel at xxxxx
Wed Jul 4 11:14:08 UTC 2007


Revision: 1658
          http://svn.sourceforge.net/geany/?rev=1658&view=rev
Author:   ntrel
Date:     2007-07-04 04:14:05 -0700 (Wed, 04 Jul 2007)

Log Message:
-----------
Add comment for utils_free_pointers() warning not to use it if any
pointers may be NULL.

Modified Paths:
--------------
    trunk/src/utils.c
    trunk/src/utils.h

Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c	2007-07-02 18:37:17 UTC (rev 1657)
+++ trunk/src/utils.c	2007-07-04 11:14:05 UTC (rev 1658)
@@ -1480,8 +1480,10 @@
 }
 
 
-/* Frees all passed pointers if they are non-NULL, the first argument is nothing special,
- * it will also be freed, the list should be ended with NULL */
+/* Frees all passed pointers if they are *ALL* non-NULL.
+ * Do not use if any pointers may be NULL.
+ * The first argument is nothing special, it will also be freed.
+ * The list must be ended with NULL. */
 void utils_free_pointers(gpointer first, ...)
 {
 	va_list a;

Modified: trunk/src/utils.h
===================================================================
--- trunk/src/utils.h	2007-07-02 18:37:17 UTC (rev 1657)
+++ trunk/src/utils.h	2007-07-04 11:14:05 UTC (rev 1658)
@@ -164,8 +164,10 @@
 gchar *utils_get_utf8_from_locale(const gchar *locale_text);
 
 
-/* Frees all passed pointers if they are non-NULL, the first argument is nothing special,
- * it will also be freed, the list should be ended with NULL */
+/* Frees all passed pointers if they are *ALL* non-NULL.
+ * Do not use if any pointers may be NULL.
+ * The first argument is nothing special, it will also be freed.
+ * The list must be ended with NULL. */
 void utils_free_pointers(gpointer first, ...) G_GNUC_NULL_TERMINATED;
 
 /* Creates a string array deep copy of a series of non-NULL strings.


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list