[geany/geany] 397389: Move deprecated setptr() macro inside GEANY_DISABLE_DEPRECATED guards
Colomban Wendling
git-noreply at xxxxx
Wed Feb 24 18:29:44 UTC 2016
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Wed, 24 Feb 2016 18:29:44 UTC
Commit: 3973892e29e5755d8b940870c6884fdbe94dd138
https://github.com/geany/geany/commit/3973892e29e5755d8b940870c6884fdbe94dd138
Log Message:
-----------
Move deprecated setptr() macro inside GEANY_DISABLE_DEPRECATED guards
Modified Paths:
--------------
src/utils.h
Modified: src/utils.h
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -49,8 +49,13 @@ G_BEGIN_DECLS
* E.g. @code SETPTR(str, g_strndup(str, 5)); @endcode
**/
#define SETPTR(ptr, result) \
- do setptr(ptr, result) while (0)
+ do {\
+ gpointer setptr_tmp = ptr;\
+ ptr = result;\
+ g_free(setptr_tmp);\
+ } while (0)
+#ifndef GEANY_DISABLE_DEPRECATED
/** @deprecated 2011/11/15 - use SETPTR() instead. */
#define setptr(ptr, result) \
{\
@@ -58,6 +63,7 @@ G_BEGIN_DECLS
ptr = result;\
g_free(setptr_tmp);\
}
+#endif
/** Duplicates a string on the stack using @c g_alloca().
* Like glibc's @c strdupa(), but portable.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list