From a9fa16dec26d31e60f2b393cc6e585e53b83414a Mon Sep 17 00:00:00 2001 From: Marcelo Gornstein Date: Mon, 18 Mar 2019 14:56:19 -0300 Subject: [PATCH] making on_load static --- c_src/ebloom_nifs.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/c_src/ebloom_nifs.cpp b/c_src/ebloom_nifs.cpp index 206bbd8..9495f17 100644 --- a/c_src/ebloom_nifs.cpp +++ b/c_src/ebloom_nifs.cpp @@ -1,21 +1,21 @@ // ------------------------------------------------------------------- -// +// // Copyright (c) 2010 Basho Technologies, Inc. All Rights Reserved. -// +// // This file is provided to you under the Apache License, // Version 2.0 (the "License"); you may not use this file // except in compliance with the License. You may obtain // a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // ------------------------------------------------------------------- #include "ebloom_nifs.h" @@ -50,7 +50,7 @@ extern "C" void ebloom_filter_dtor(ErlNifEnv* env, void* arg); - int on_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info); + static int on_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info); static ErlNifFunc nif_funcs[] = { @@ -278,7 +278,7 @@ void ebloom_filter_dtor(ErlNifEnv* env, void* arg) delete handle->filter; } -int on_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) +static int on_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) { ErlNifResourceFlags flags = (ErlNifResourceFlags)(ERL_NIF_RT_CREATE | ERL_NIF_RT_TAKEOVER); BLOOM_FILTER_RESOURCE = enif_open_resource_type_compat(env, "bloom_filter_resource",