Branch: Tag:

2004-05-19

2004-05-19 00:04:08 by Martin Nilsson <mani@lysator.liu.se>

Use SIMPLE_OUT_OF_MEMORY_ERROR

Rev: src/post_modules/Nettle/hash.cmod:1.24
Rev: src/post_modules/Nettle/nettle.cmod:1.37

1:   /* hash.cmod -*- c -*- */      #include "global.h" - RCSID("$Id: hash.cmod,v 1.23 2004/04/30 20:19:53 nilsson Exp $"); + RCSID("$Id: hash.cmod,v 1.24 2004/05/19 00:03:52 nilsson Exp $");   #include "interpret.h"   #include "svalue.h"   #include "threads.h"
118:       ctx = (void *)alloca(meta->context_size);    if(!ctx) -  Pike_error("Out of memory or karma.\n"); +  SIMPLE_OUT_OF_MEMORY_ERROR("hash", meta->context_size);       THREADS_ALLOW();    meta->init(ctx);
189:       ctx = (void *)alloca(meta->context_size);    if (!ctx) -  Pike_error("Out of memory.\n"); +  SIMPLE_OUT_OF_MEMORY_ERROR("hash", meta->context_size);       read_buffer=(char *)malloc(8192);    if (!read_buffer) -  Pike_error("Out of memory.\n"); +  SIMPLE_OUT_OF_MEMORY_ERROR("hash", 8192);       THREADS_ALLOW();    meta->init(ctx);