Skip to content
Browse files

Fix NIF library initialization on R13B04

This avoids 'undefined symbol' errors when loading the NIF in R13B04.
  • Loading branch information...
1 parent 9c5deda commit 2aa6adb157312d426dff359688179e9829bdeb23 @fdmanana committed
Showing with 8 additions and 10 deletions.
  1. +8 −10 c_src/snappy.cc
View
18 c_src/snappy.cc
@@ -202,14 +202,12 @@ extern "C" {
}
+ static ErlNifFunc nif_functions[] = {
+ {"compress", 1, snappy_compress},
+ {"decompress", 1, snappy_decompress},
+ {"get_uncompressed_length", 1, snappy_get_uncompressed_length},
+ {"is_valid_compressed_buffer", 1, snappy_is_valid_compressed_buffer}
+ };
+
+ ERL_NIF_INIT(snappy, nif_functions, &on_load, &on_reload, &on_upgrade, NULL);
}
-
-
-static ErlNifFunc nif_functions[] = {
- {"compress", 1, snappy_compress},
- {"decompress", 1, snappy_decompress},
- {"get_uncompressed_length", 1, snappy_get_uncompressed_length},
- {"is_valid_compressed_buffer", 1, snappy_is_valid_compressed_buffer}
-};
-
-ERL_NIF_INIT(snappy, nif_functions, &on_load, &on_reload, &on_upgrade, NULL);

0 comments on commit 2aa6adb

Please sign in to comment.
Something went wrong with that request. Please try again.