From 98e3c7e3477cb1b241a5f4df8917ab7961e8fbb2 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 4 May 2013 15:43:25 +0200 Subject: [PATCH] WUtil: Added comment about values returned by API functions This is mainly to be consistent with what's done in the rest of the file, but it is better to have it there that nowhere at all anyway... --- WINGs/WINGs/WUtil.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WINGs/WINGs/WUtil.h b/WINGs/WINGs/WUtil.h index 2b462db9..a4e8f270 100644 --- a/WINGs/WINGs/WUtil.h +++ b/WINGs/WINGs/WUtil.h @@ -193,6 +193,8 @@ void __wmessage(const char *func, const char *file, int line, int type, const ch /* ---[ WINGs/findfile.c ]------------------------------------------------ */ +/* For the 4 function below, you have to free the returned string when you no longer need it */ + char* wfindfile(const char *paths, const char *file); char* wfindfileinlist(char *const *path_list, const char *file); @@ -813,10 +815,13 @@ Bool WMWritePropListToFile(WMPropList *plist, const char *path); /* ---[ WINGs/userdefaults.c ]-------------------------------------------- */ +/* don't free the returned string */ char* wusergnusteppath(void); +/* Free the returned string when you no longer need it */ char* wdefaultspathfordomain(const char *domain); +/* Free the returned string when you no longer need it */ char* wglobaldefaultspathfordomain(const char *domain); WMUserDefaults* WMGetStandardUserDefaults(void); @@ -841,6 +846,7 @@ void WMSetUDObjectForKey(WMUserDefaults *database, WMPropList *object, void WMRemoveUDObjectForKey(WMUserDefaults *database, const char *defaultName); +/* Returns a reference. Do not free it! */ char* WMGetUDStringForKey(WMUserDefaults *database, const char *defaultName); int WMGetUDIntegerForKey(WMUserDefaults *database, const char *defaultName); -- 2.11.4.GIT