Fix: make jerryx_module_resolve resolvers argument const (#1942)

The resolvers argument that is passed to jerryx_module_resolve() is
not mutated by the function. Therefore the argument should be const.
In the docs, a static const array is passed, but this currently does not
work w/o a cast. This patch fixes this.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
This commit is contained in:
Martijn Thé
2017-08-01 15:39:21 +02:00
committed by Zsolt Borbély
parent 2a2a15f364
commit 66b072d5ae
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -69,6 +69,6 @@ typedef bool (*jerryx_module_resolver_t) (const jerry_char_t *name, jerry_value_
* Load a copy of a module into the current context using the provided module resolvers, or return one that was already
* loaded if it is found.
*/
jerry_value_t jerryx_module_resolve (const jerry_char_t *name, jerryx_module_resolver_t *resolvers, size_t count);
jerry_value_t jerryx_module_resolve (const jerry_char_t *name, const jerryx_module_resolver_t *resolvers, size_t count);
#endif /* !JERRYX_MODULE_H */