You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/01/17 23:59:35 UTC
[02/50] [abbrv] git commit: Fix NIF library initialization on R13B04
Fix NIF library initialization on R13B04
This avoids 'undefined symbol' errors when loading the NIF in R13B04.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-snappy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-snappy/commit/2aa6adb1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-snappy/tree/2aa6adb1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-snappy/diff/2aa6adb1
Branch: refs/heads/import
Commit: 2aa6adb157312d426dff359688179e9829bdeb23
Parents: 9c5deda
Author: Filipe David Manana <fd...@apache.org>
Authored: Fri Apr 8 21:27:15 2011 +0100
Committer: Filipe David Manana <fd...@apache.org>
Committed: Fri Apr 8 21:27:15 2011 +0100
----------------------------------------------------------------------
c_src/snappy.cc | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-snappy/blob/2aa6adb1/c_src/snappy.cc
----------------------------------------------------------------------
diff --git a/c_src/snappy.cc b/c_src/snappy.cc
index 398928b..cbbd317 100644
--- a/c_src/snappy.cc
+++ b/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);