Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to the latest hg #523

Open
wants to merge 1 commit into
base: libpurple-integration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Makefile
Makefile.in
pidgin
win32-install-dir
.idea
27 changes: 27 additions & 0 deletions pidgin/libpurple/glibcompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,30 @@ purple_g_stat(const gchar *filename, GStatBufW32 *buf)
/******************************************************************************
* g_assert_* macros
*****************************************************************************/

#if !GLIB_CHECK_VERSION(2, 32, 0)
static inline GByteArray * g_byte_array_new_take(guint8 *data, gsize len)
{
GByteArray *array;

array = g_byte_array_new();
g_byte_array_append(array, data, len);
g_free(data);

return array;
}

static inline void g_queue_free_full(GQueue *queue, GDestroyNotify free_func)
{
g_queue_foreach(queue, (GFunc)free_func, NULL);
g_queue_free(queue);
}
#endif

#if !GLIB_CHECK_VERSION(2, 30, 0)
#define G_VALUE_INIT {0, {{0}}}
#endif

#if !GLIB_CHECK_VERSION(2, 38, 0)
#define g_assert_true(expr) G_STMT_START { \
if G_LIKELY (expr) ; else \
Expand All @@ -86,6 +110,9 @@ purple_g_stat(const gchar *filename, GStatBufW32 *buf)
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
"'" #expr "' should be NULL"); \
} G_STMT_END
#define G_ADD_PRIVATE(TypeName) G_STMT_START { } G_STMT_END
#else
#define g_type_class_add_private(k,s) G_STMT_START { } G_STMT_END
#endif

#if !GLIB_CHECK_VERSION(2, 40, 0)
Expand Down
Loading