Skip to content

Commit

Permalink
Revert "#108 fix"
Browse files Browse the repository at this point in the history
This reverts commit c41454d.

Revert "#108 fix"

This reverts commit 76016bc.

Revert "libsodiumModule -> libsodium"

This reverts commit 00e8ed0.

Revert "Unexport ready"

This reverts commit bb0b50d.

Revert "return entire module as promise"

This reverts commit d262e55.
  • Loading branch information
jedisct1 committed Oct 5, 2017
1 parent 81b6cbc commit 07c26e3
Show file tree
Hide file tree
Showing 3 changed files with 531 additions and 526 deletions.
2 changes: 1 addition & 1 deletion libsodium
6 changes: 3 additions & 3 deletions wrapper/build-wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function exportFunctions(symbols) {
exportsCode += "\tfor (var i = 0; i < functions.length; i++) {\n";
exportsCode +=
'\t\tif (typeof libsodium["_" + exported_functions[i]] === "function") {\n';
exportsCode += "\t\t\tsodiumExports[exported_functions[i]] = functions[i];\n";
exportsCode += "\t\t\texports[exported_functions[i]] = functions[i];\n";
exportsCode += "\t\t}\n";
exportsCode += "\t}\n";
}
Expand All @@ -98,7 +98,7 @@ function exportConstants(constSymbols) {
exportsCode += "\tfor (var i = 0; i < constants.length; i++) {\n";
exportsCode += '\t\tvar raw = libsodium["_" + constants[i].toLowerCase()];\n';
exportsCode +=
'\t\tif (typeof raw === "function") sodiumExports[constants[i]] = raw()|0;\n';
'\t\tif (typeof raw === "function") exports[constants[i]] = raw()|0;\n';
exportsCode += "\t}\n";

keys = [];
Expand All @@ -112,7 +112,7 @@ function exportConstants(constSymbols) {
exportsCode +=
'\t\tvar raw = libsodium["_" + constants_str[i].toLowerCase()];\n';
exportsCode +=
'\t\tif (typeof raw === "function") sodiumExports[constants_str[i]] = libsodium.Pointer_stringify(raw());\n';
'\t\tif (typeof raw === "function") exports[constants_str[i]] = libsodium.Pointer_stringify(raw());\n';
exportsCode += "\t}\n";
}

Expand Down
Loading

0 comments on commit 07c26e3

Please sign in to comment.