summaryrefslogtreecommitdiff
path: root/cocoa
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-10-03 19:24:58 +0100
committerVincent Sanders <vince@netsurf-browser.org>2012-10-03 19:26:17 +0100
commitc1671f37b1a6b8872d736bfdcee25770dbbd5a06 (patch)
tree281e072de977044debdee1dc42efebc5f3c533db /cocoa
parent5a2212fda6332980f351a8d8ca03f7d79d8c9712 (diff)
downloadnetsurf-c1671f37b1a6b8872d736bfdcee25770dbbd5a06.tar.gz
netsurf-c1671f37b1a6b8872d736bfdcee25770dbbd5a06.tar.bz2
reduce talloc usage to box tree layout only
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/apple_image.m9
1 files changed, 4 insertions, 5 deletions
diff --git a/cocoa/apple_image.m b/cocoa/apple_image.m
index f28ec25bf..ab17f8ab4 100644
--- a/cocoa/apple_image.m
+++ b/cocoa/apple_image.m
@@ -24,7 +24,6 @@
#include "content/content_protected.h"
#include "image/bitmap.h"
#include "desktop/plotters.h"
-#include "utils/talloc.h"
#include "utils/utils.h"
#include "utils/schedule.h"
@@ -113,14 +112,14 @@ nserror apple_image_create(const content_handler *handler,
apple_image_content *ai;
nserror error;
- ai = talloc_zero(0, apple_image_content);
+ ai = calloc(1, sizeof(apple_image_content));
if (ai == NULL)
return NSERROR_NOMEM;
error = content__init(&ai->base, handler, imime_type, params,
llcache, fallback_charset, quirks);
if (error != NSERROR_OK) {
- talloc_free(ai);
+ free(ai);
return error;
}
@@ -188,7 +187,7 @@ bool apple_image_convert(struct content *c)
if (frames > 1) {
ai->frames = frames;
ai->currentFrame = 0;
- ai->frameTimes = talloc_zero_array( ai, int, ai->frames );
+ ai->frameTimes = calloc( ai->frames , sizeof(int));
for (NSUInteger i = 0; i < frames; i++) {
[image setProperty: NSImageCurrentFrame withValue: [NSNumber numberWithUnsignedInteger: i]];
ai->frameTimes[i] = 100 * [[image valueForProperty: NSImageCurrentFrameDuration] floatValue];
@@ -217,7 +216,7 @@ nserror apple_image_clone(const struct content *old, struct content **newc)
apple_image_content *ai_old = (apple_image_content *)old;
nserror error;
- ai = talloc_zero(0, apple_image_content);
+ ai = calloc(1, sizeof(apple_image_content));
if (ai == NULL)
return NSERROR_NOMEM;