[gegl] buffer: deprecate gegl_tile_backend_unlink_swap()



commit a4b93a371826152b22f09e362347a4206d6553ca
Author: Ell <ell_se yahoo com>
Date:   Mon Dec 17 07:02:23 2018 -0500

    buffer: deprecate gegl_tile_backend_unlink_swap()
    
    ... in favor of gegl_buffer_swap_remove_file().
    
    Adapt GeglTileBackendFileAsync to the change.
    
    This should have been part of commit
    b61f9015bf19611225df9832db3cfd9ee2558fc9.

 gegl/buffer/gegl-tile-backend-file-async.c | 5 ++++-
 gegl/buffer/gegl-tile-backend.h            | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gegl/buffer/gegl-tile-backend-file-async.c b/gegl/buffer/gegl-tile-backend-file-async.c
index 6d14d6347..2d3ea602a 100644
--- a/gegl/buffer/gegl-tile-backend-file-async.c
+++ b/gegl/buffer/gegl-tile-backend-file-async.c
@@ -49,6 +49,7 @@
 #include "gegl-tile-backend.h"
 #include "gegl-tile-backend-file.h"
 #include "gegl-buffer-index.h"
+#include "gegl-buffer-swap.h"
 #include "gegl-buffer-types.h"
 #include "gegl-debug.h"
 #include "gegl-buffer-config.h"
@@ -968,7 +969,9 @@ gegl_tile_backend_file_finalize (GObject *object)
 
   if (self->path)
     {
-      gegl_tile_backend_unlink_swap (self->path);
+      if (gegl_buffer_swap_has_file (self->path))
+        gegl_buffer_swap_remove_file (self->path);
+
       g_free (self->path);
     }
 
diff --git a/gegl/buffer/gegl-tile-backend.h b/gegl/buffer/gegl-tile-backend.h
index d82b02e57..08ff2347d 100644
--- a/gegl/buffer/gegl-tile-backend.h
+++ b/gegl/buffer/gegl-tile-backend.h
@@ -158,7 +158,11 @@ GType gegl_tile_backend_get_type (void) G_GNUC_CONST;
  *
  * For safety, this function will check that the swap file is in the swap
  * directory before deletion but it won't perform any other check.
+ *
+ * Deprecated: 0.4.14: This function is not compatible with a dynamically-
+ * changing swap path. Use gegl_buffer_swap_remove_file() instead.
  */
+G_DEPRECATED_FOR (gegl_buffer_swap_remove_file)
 void gegl_tile_backend_unlink_swap (gchar *path);
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]