glibcompat.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef MC_GLIBCOMPAT_H
  2. #define MC_GLIBCOMPAT_H
  3. /*** typedefs(not structures) and defined constants **********************************************/
  4. #ifndef G_OPTION_ENTRY_NULL
  5. #define G_OPTION_ENTRY_NULL { NULL, '\0', 0, 0, NULL, NULL, NULL }
  6. #endif /* G_OPTION_ENTRY_NULL */
  7. /*** enums ***************************************************************************************/
  8. /*** structures declarations (and typedefs of structures)*****************************************/
  9. /*** global variables defined in .c file *********************************************************/
  10. /*** declarations of public functions ************************************************************/
  11. #if !GLIB_CHECK_VERSION(2, 54, 0)
  12. gboolean g_ptr_array_find_with_equal_func (GPtrArray *haystack, gconstpointer needle,
  13. GEqualFunc equal_func, guint *index_);
  14. #endif /* ! GLIB_CHECK_VERSION (2, 54, 0) */
  15. #if !GLIB_CHECK_VERSION(2, 63, 3)
  16. void g_clear_slist (GSList **slist_ptr, GDestroyNotify destroy);
  17. void g_clear_list (GList **list_ptr, GDestroyNotify destroy);
  18. #endif /* ! GLIB_CHECK_VERSION (2, 63, 3) */
  19. #if !GLIB_CHECK_VERSION(2, 60, 0)
  20. void g_queue_clear_full (GQueue *queue, GDestroyNotify free_func);
  21. #endif /* ! GLIB_CHECK_VERSION (2, 60, 0) */
  22. #if !GLIB_CHECK_VERSION(2, 77, 0)
  23. GString *g_string_new_take (char *init);
  24. #endif /* ! GLIB_CHECK_VERSION (2, 77, 0) */
  25. /* There is no such API in GLib2 */
  26. GString *mc_g_string_copy (GString *dest, const GString *src);
  27. /* There is no such API in GLib2 */
  28. GString *mc_g_string_dup (const GString *s);
  29. /* There is no such API in GLib2 */
  30. GString *mc_g_string_append_c_len (GString *s, gchar c, guint len);
  31. /*** inline functions ****************************************************************************/
  32. #endif /* MC_GLIBCOMPAT_H */