[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113950: Fix previous commit.
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] trunk r113950: Fix previous commit. |
Date: |
Mon, 19 Aug 2013 15:14:44 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113950
revision-id: address@hidden
parent: address@hidden
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Mon 2013-08-19 17:14:42 +0200
message:
Fix previous commit.
(imagemagick_get_animation_cache): Revert to previous definition
so that it actually works. But keep the memory leak fix.
modified:
src/image.c image.c-20091113204419-o5vbwnq5f7feedwu-2969
=== modified file 'src/image.c'
--- a/src/image.c 2013-08-19 14:52:52 +0000
+++ b/src/image.c 2013-08-19 15:14:42 +0000
@@ -7895,6 +7895,7 @@
cache->wand = 0;
cache->index = 0;
cache->next = 0;
+ cache->update_time = current_emacs_time ();
return cache;
}
@@ -7927,28 +7928,25 @@
{
char *signature = MagickGetImageSignature (wand);
struct animation_cache *cache;
- struct animation_cache **pcache;
imagemagick_prune_animation_cache ();
-
- if (! animation_cache)
- animation_cache = cache = imagemagick_create_cache (signature);
- else
- {
- for (pcache = &animation_cache; *pcache; pcache = &cache->next)
- {
- cache = *pcache;
- if (! cache)
- {
- animation_cache = cache = imagemagick_create_cache (signature);
- break;
- }
- if (strcmp (signature, cache->signature) == 0)
- {
- DestroyString (signature);
- break;
- }
- }
+ cache = animation_cache;
+
+ if (! cache)
+ {
+ animation_cache = imagemagick_create_cache (signature);
+ return animation_cache;
+ }
+
+ while (strcmp(signature, cache->signature) &&
+ cache->next)
+ cache = cache->next;
+
+ if (strcmp(signature, cache->signature))
+ {
+ cache->next = imagemagick_create_cache (signature);
+ DestroyString (signature);
+ return cache->next;
}
cache->update_time = current_emacs_time ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113950: Fix previous commit.,
Lars Ingebrigtsen <=