diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-12-26 00:56:02 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-12-26 00:56:02 +0100 |
commit | edf5d2cc6203b7fd0b1dd9913613b8e18935a026 (patch) | |
tree | fa7d190a94ba5e842423c7994292063207867be0 | |
parent | 18ee7c7f53c66d7837de54de9351a07e8af09494 (diff) | |
download | wallet-core-edf5d2cc6203b7fd0b1dd9913613b8e18935a026.tar.xz |
more types
-rw-r--r-- | extension/background/emscriptif.ts | 31 | ||||
-rw-r--r-- | extension/manifest.json | 2 |
2 files changed, 21 insertions, 12 deletions
diff --git a/extension/background/emscriptif.ts b/extension/background/emscriptif.ts index e8c9e0cec..b5b040dc5 100644 --- a/extension/background/emscriptif.ts +++ b/extension/background/emscriptif.ts @@ -16,17 +16,17 @@ "use strict"; -declare var Module: any; - - -// Size of a native pointer. -const PTR_SIZE = 4; - -const GNUNET_OK = 1; -const GNUNET_YES = 1; -const GNUNET_NO = 0; -const GNUNET_SYSERR = -1; +declare var Module: EmscModule; +interface EmscModule { + cwrap: EmscFunGen; + _free(ptr: number); + _malloc(n: number): number; + Pointer_stringify(p: number, len?: number): string; + getValue(ptr: number, type: string, noSafe?: boolean): number; + setValue(ptr: number, value: number, type: string, noSafe?: boolean); + writeStringToMemory(s: string, buffer: number, dontAddNull?: boolean); +} interface EmscFunGen { (name: string, @@ -43,6 +43,16 @@ interface EmscFunGen { args: string[]): ((...x: (number|string)[]) => string); } + +// Size of a native pointer. +const PTR_SIZE = 4; + +const GNUNET_OK = 1; +const GNUNET_YES = 1; +const GNUNET_NO = 0; +const GNUNET_SYSERR = -1; + + let getEmsc: EmscFunGen = (...args) => Module.cwrap.apply(null, args); var emsc = { @@ -268,7 +278,6 @@ class SyncArena extends DefaultArena { } } - let arenaStack: Arena[] = []; arenaStack.push(new SyncArena()); diff --git a/extension/manifest.json b/extension/manifest.json index 764c88789..e56704083 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -2,7 +2,7 @@ "description": "Privacy preserving and transparent payments", "manifest_version": 2, "name": "GNU Taler Wallet", - "version": "0.4", + "version": "0.5", "applications": { "gecko": { |