Skip to content

Replace JSValueConst with JSValue #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ static int fib(int n)
return fib(n - 1) + fib(n - 2);
}

static JSValue js_fib(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv)
static JSValue js_fib(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int n, res;
if (JS_ToInt32(ctx, &n, argv[0]))
Expand Down
12 changes: 6 additions & 6 deletions examples/point.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ static void js_point_finalizer(JSRuntime *rt, JSValue val)
}

static JSValue js_point_ctor(JSContext *ctx,
JSValueConst new_target,
int argc, JSValueConst *argv)
JSValue new_target,
int argc, JSValue *argv)
{
JSPointData *s;
JSValue obj = JS_UNDEFINED;
Expand Down Expand Up @@ -74,7 +74,7 @@ static JSValue js_point_ctor(JSContext *ctx,
return JS_EXCEPTION;
}

static JSValue js_point_get_xy(JSContext *ctx, JSValueConst this_val, int magic)
static JSValue js_point_get_xy(JSContext *ctx, JSValue this_val, int magic)
{
JSPointData *s = JS_GetOpaque2(ctx, this_val, js_point_class_id);
if (!s)
Expand All @@ -85,7 +85,7 @@ static JSValue js_point_get_xy(JSContext *ctx, JSValueConst this_val, int magic)
return JS_NewInt32(ctx, s->y);
}

static JSValue js_point_set_xy(JSContext *ctx, JSValueConst this_val, JSValue val, int magic)
static JSValue js_point_set_xy(JSContext *ctx, JSValue this_val, JSValue val, int magic)
{
JSPointData *s = JS_GetOpaque2(ctx, this_val, js_point_class_id);
int v;
Expand All @@ -100,8 +100,8 @@ static JSValue js_point_set_xy(JSContext *ctx, JSValueConst this_val, JSValue va
return JS_UNDEFINED;
}

static JSValue js_point_norm(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv)
static JSValue js_point_norm(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSPointData *s = JS_GetOpaque2(ctx, this_val, js_point_class_id);
if (!s)
Expand Down
2 changes: 1 addition & 1 deletion qjsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void dump_hex(FILE *f, const uint8_t *buf, size_t len)
}

static void output_object_code(JSContext *ctx,
FILE *fo, JSValueConst obj, const char *c_name,
FILE *fo, JSValue obj, const char *c_name,
BOOL load_only)
{
uint8_t *out_buf;
Expand Down
Loading