summaryrefslogtreecommitdiff
path: root/src/binaryen-c.h
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-05-24 15:02:42 -0700
committerGitHub <noreply@github.com>2019-05-24 15:02:42 -0700
commitdc37d7b74edde1876f2114ad8edd10ab076e778f (patch)
treef9253c9b93ac7e544b29a594c96e1ba217b51d2d /src/binaryen-c.h
parent7ae38053cf1e1e5c8f84c34a142efb043f6d4810 (diff)
downloadbinaryen-dc37d7b74edde1876f2114ad8edd10ab076e778f.tar.gz
binaryen-dc37d7b74edde1876f2114ad8edd10ab076e778f.tar.bz2
binaryen-dc37d7b74edde1876f2114ad8edd10ab076e778f.zip
Add `getGlobal` to binaryen.js (#2142)
We have `getFunction`, but not `getGlobal` because its name clashed with APIs for the deprecated instruction `get_global`. Now we have reflected instruction renaming in code, we can add it for consistency.
Diffstat (limited to 'src/binaryen-c.h')
-rw-r--r--src/binaryen-c.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h
index ae6747cea..03da33931 100644
--- a/src/binaryen-c.h
+++ b/src/binaryen-c.h
@@ -853,11 +853,9 @@ BinaryenFunctionRef BinaryenAddFunction(BinaryenModuleRef module,
BinaryenType* varTypes,
BinaryenIndex numVarTypes,
BinaryenExpressionRef body);
-
// Gets a function reference by name.
BinaryenFunctionRef BinaryenGetFunction(BinaryenModuleRef module,
const char* name);
-
// Removes a function by name.
void BinaryenRemoveFunction(BinaryenModuleRef module, const char* name);
@@ -913,6 +911,8 @@ BinaryenGlobalRef BinaryenAddGlobal(BinaryenModuleRef module,
BinaryenType type,
int8_t mutable_,
BinaryenExpressionRef init);
+// Gets a global reference by name.
+BinaryenGlobalRef BinaryenGetGlobal(BinaryenModuleRef module, const char* name);
void BinaryenRemoveGlobal(BinaryenModuleRef module, const char* name);
// Function table. One per module