Skip to content

Commit

Permalink
Replace JSValueConst with JSValue (quickjs-ng#195)
Browse files Browse the repository at this point in the history
JSValueConst was only used for the now removed CONFIG_CHECK_JSVALUE
build mode. It is kept around as an alias for JSValue in quickjs.h to
avoid breaking everyone's source builds but remove it everywhere else.
  • Loading branch information
bnoordhuis authored Dec 10, 2023
1 parent 4d57997 commit f1b7b6d
Show file tree
Hide file tree
Showing 9 changed files with 1,504 additions and 1,504 deletions.
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

0 comments on commit f1b7b6d

Please sign in to comment.