Skip to content

Commit

Permalink
Switch to emscripten 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Oct 3, 2020
1 parent 2b324ec commit c43a89d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
id: cache
with:
path: '.emsdk-cache'
key: emscripten-1.39.20
key: emscripten-2.0.6
- uses: mymindstorm/setup-emsdk@2a4a91b
with:
version: '1.39.20'
version: '2.0.6'
actions-cache-folder: '.emsdk-cache'
- name: make
run: make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: mymindstorm/setup-emsdk@2a4a91b
with: {version: '1.39.20'}
with: {version: '2.0.6'}
- name: make
run: make
- name: Create Release
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ EMFLAGS_OPTIMIZED= \
-s INLINING_LIMIT=50 \
-O3 \
-flto \
--llvm-lto 1 \
--closure 1

EMFLAGS_DEBUG = \
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sql.js",
"version": "1.3.1",
"version": "1.3.2",
"description": "SQLite library with support for opening and writing databases, prepared statements, and more. This SQLite library is in pure javascript (compiled with emscripten).",
"keywords": [
"sql",
Expand Down
6 changes: 3 additions & 3 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
this.pos += 1;
}
var bytes = intArrayFromString(string);
var strptr = allocate(bytes, "i8", ALLOC_NORMAL);
var strptr = allocate(bytes, ALLOC_NORMAL);
this.allocatedmem.push(strptr);
this.db.handleError(sqlite3_bind_text(
this.stmt,
Expand All @@ -491,7 +491,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
pos = this.pos;
this.pos += 1;
}
var blobptr = allocate(array, "i8", ALLOC_NORMAL);
var blobptr = allocate(array, ALLOC_NORMAL);
this.allocatedmem.push(blobptr);
this.db.handleError(sqlite3_bind_blob(
this.stmt,
Expand Down Expand Up @@ -983,7 +983,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
if (result === null) {
sqlite3_result_null(cx);
} else if (result.length != null) {
var blobptr = allocate(result, "i8", ALLOC_NORMAL);
var blobptr = allocate(result, ALLOC_NORMAL);
sqlite3_result_blob(cx, blobptr, result.length, -1);
_free(blobptr);
} else {
Expand Down

0 comments on commit c43a89d

Please sign in to comment.