Skip to content

Commit f1b7b6d

Browse files
authored
Replace JSValueConst with JSValue (#195)
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.
1 parent 4d57997 commit f1b7b6d

File tree

9 files changed

+1504
-1504
lines changed

9 files changed

+1504
-1504
lines changed

examples/fib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ static int fib(int n)
3535
return fib(n - 1) + fib(n - 2);
3636
}
3737

38-
static JSValue js_fib(JSContext *ctx, JSValueConst this_val,
39-
int argc, JSValueConst *argv)
38+
static JSValue js_fib(JSContext *ctx, JSValue this_val,
39+
int argc, JSValue *argv)
4040
{
4141
int n, res;
4242
if (JS_ToInt32(ctx, &n, argv[0]))

examples/point.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ static void js_point_finalizer(JSRuntime *rt, JSValue val)
4343
}
4444

4545
static JSValue js_point_ctor(JSContext *ctx,
46-
JSValueConst new_target,
47-
int argc, JSValueConst *argv)
46+
JSValue new_target,
47+
int argc, JSValue *argv)
4848
{
4949
JSPointData *s;
5050
JSValue obj = JS_UNDEFINED;
@@ -74,7 +74,7 @@ static JSValue js_point_ctor(JSContext *ctx,
7474
return JS_EXCEPTION;
7575
}
7676

77-
static JSValue js_point_get_xy(JSContext *ctx, JSValueConst this_val, int magic)
77+
static JSValue js_point_get_xy(JSContext *ctx, JSValue this_val, int magic)
7878
{
7979
JSPointData *s = JS_GetOpaque2(ctx, this_val, js_point_class_id);
8080
if (!s)
@@ -85,7 +85,7 @@ static JSValue js_point_get_xy(JSContext *ctx, JSValueConst this_val, int magic)
8585
return JS_NewInt32(ctx, s->y);
8686
}
8787

88-
static JSValue js_point_set_xy(JSContext *ctx, JSValueConst this_val, JSValue val, int magic)
88+
static JSValue js_point_set_xy(JSContext *ctx, JSValue this_val, JSValue val, int magic)
8989
{
9090
JSPointData *s = JS_GetOpaque2(ctx, this_val, js_point_class_id);
9191
int v;
@@ -100,8 +100,8 @@ static JSValue js_point_set_xy(JSContext *ctx, JSValueConst this_val, JSValue va
100100
return JS_UNDEFINED;
101101
}
102102

103-
static JSValue js_point_norm(JSContext *ctx, JSValueConst this_val,
104-
int argc, JSValueConst *argv)
103+
static JSValue js_point_norm(JSContext *ctx, JSValue this_val,
104+
int argc, JSValue *argv)
105105
{
106106
JSPointData *s = JS_GetOpaque2(ctx, this_val, js_point_class_id);
107107
if (!s)

qjsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static void dump_hex(FILE *f, const uint8_t *buf, size_t len)
150150
}
151151

152152
static void output_object_code(JSContext *ctx,
153-
FILE *fo, JSValueConst obj, const char *c_name,
153+
FILE *fo, JSValue obj, const char *c_name,
154154
BOOL load_only)
155155
{
156156
uint8_t *out_buf;

0 commit comments

Comments
 (0)