diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2016-08-16 17:01:33 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2016-08-19 10:10:29 +0300 |
commit | 90031662d2b84ed3f5cc536fa589d4c7b30d8729 (patch) | |
tree | a3dc0c9e079c2e0cc778d7ff8bc1aac44742aaf5 | |
parent | b043b6c4e9dcf907e42c1301f137792a4079bef1 (diff) | |
download | pacrunner-90031662d2b84ed3f5cc536fa589d4c7b30d8729.tar.gz |
mozjs: Rename 'ctx' argument to dnsresolve() to 'jsctx'
...for reasons which will become apparent shortly.
-rw-r--r-- | plugins/mozjs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/mozjs.c b/plugins/mozjs.c index 0b9a4c9..b980d9d 100644 --- a/plugins/mozjs.c +++ b/plugins/mozjs.c @@ -121,16 +121,16 @@ static JSBool myipaddress(JSContext *jsctx, uintN argc, jsval *vp) return JS_TRUE; } -static JSBool dnsresolve(JSContext *ctx, uintN argc, jsval *vp) +static JSBool dnsresolve(JSContext *jsctx, uintN argc, jsval *vp) { char address[NI_MAXHOST]; - jsval *argv = JS_ARGV(ctx, vp); - char *host = JS_EncodeString(ctx, JS_ValueToString(ctx, argv[0])); + jsval *argv = JS_ARGV(jsctx, vp); + char *host = JS_EncodeString(jsctx, JS_ValueToString(jsctx, argv[0])); char **split_res; DBG("host %s", host); - JS_SET_RVAL(ctx, vp, JSVAL_NULL); + JS_SET_RVAL(jsctx, vp, JSVAL_NULL); /* Q&D test on host to know if it is a proper hostname */ split_res = g_strsplit_set(host, ":%?!,;@\\'*|<>{}[]()+=$&~# \"", -1); @@ -147,10 +147,10 @@ static JSBool dnsresolve(JSContext *ctx, uintN argc, jsval *vp) DBG("address %s", address); - JS_SET_RVAL(ctx, vp, STRING_TO_JSVAL(JS_NewStringCopyZ(ctx, address))); + JS_SET_RVAL(jsctx, vp, STRING_TO_JSVAL(JS_NewStringCopyZ(jsctx, address))); out: - JS_free(ctx, host); + JS_free(jsctx, host); return JS_TRUE; } |