소스 검색

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;
}

불러오는 중...
취소
저장