glibcompat.h 1.8 KB

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