Return {error, enonmem} in OOM situations

This commit is contained in:
Carlos Martín Nieto
2013-05-02 11:37:35 +02:00
parent 0aa11d8532
commit ef7d2d5490
11 changed files with 56 additions and 39 deletions

View File

@@ -4,6 +4,7 @@
#include "erl_nif.h"
ERL_NIF_TERM geef_error(ErlNifEnv *env);
ERL_NIF_TERM geef_oom(ErlNifEnv *env);
typedef struct {
ERL_NIF_TERM ok;
@@ -21,6 +22,9 @@ typedef struct {
ERL_NIF_TERM timesort;
ERL_NIF_TERM reversesort;
ERL_NIF_TERM iterover;
ERL_NIF_TERM enomem;
ERL_NIF_TERM eunknown;
} geef_atoms;
extern geef_atoms atoms;