瀏覽代碼

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…
取消
儲存