Преглед изворни кода

Fix basic_nif on_load()

pull/3/head
Tuncer Ayaz пре 13 година
родитељ
комит
b594d356e1
1 измењених фајлова са 3 додато и 1 уклоњено
  1. +3
    -1
      priv/templates/basicnif.c

+ 3
- 1
priv/templates/basicnif.c Прегледај датотеку

@ -1,6 +1,6 @@
#include "erl_nif.h"
static ErlNifResourceType* {{module}}_RESOURCE;
static ErlNifResourceType* {{module}}_RESOURCE = NULL;
typedef struct
{
@ -51,6 +51,8 @@ static int on_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
if (rt == NULL)
return -1;
{{module}}_RESOURCE = rt;
return 0;
}

Loading…
Откажи
Сачувај