Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
d8b66f2d
Commit
d8b66f2d
authored
May 17, 2004
by
rswindell
Browse files
Using JSVAL_IS_NUMBER() instead of JSVAL_IS_INT() to support full 32-bit
property values.
parent
04e48a0f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
src/sbbs3/js_bbs.cpp
src/sbbs3/js_bbs.cpp
+1
-1
src/sbbs3/js_console.cpp
src/sbbs3/js_console.cpp
+2
-2
src/sbbs3/js_system.c
src/sbbs3/js_system.c
+1
-1
No files found.
src/sbbs3/js_bbs.cpp
View file @
d8b66f2d
...
...
@@ -601,7 +601,7 @@ static JSBool js_bbs_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
tiny
=
JSVAL_TO_INT
(
id
);
if
(
JSVAL_IS_
INT
(
*
vp
)
||
JSVAL_IS_BOOLEAN
(
*
vp
))
if
(
JSVAL_IS_
NUMBER
(
*
vp
)
||
JSVAL_IS_BOOLEAN
(
*
vp
))
JS_ValueToInt32
(
cx
,
*
vp
,
&
val
);
else
if
(
JSVAL_IS_STRING
(
*
vp
))
{
if
((
js_str
=
JS_ValueToString
(
cx
,
*
vp
))
==
NULL
)
...
...
src/sbbs3/js_console.cpp
View file @
d8b66f2d
...
...
@@ -153,7 +153,7 @@ static JSBool js_console_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
tiny
=
JSVAL_TO_INT
(
id
);
if
(
JSVAL_IS_
INT
(
*
vp
)
||
JSVAL_IS_BOOLEAN
(
*
vp
))
if
(
JSVAL_IS_
NUMBER
(
*
vp
)
||
JSVAL_IS_BOOLEAN
(
*
vp
))
JS_ValueToInt32
(
cx
,
*
vp
,
&
val
);
switch
(
tiny
)
{
...
...
@@ -743,7 +743,7 @@ js_printfile(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if
(
!
str
)
return
(
JS_FALSE
);
if
(
argc
>
1
&&
JSVAL_IS_
INT
(
argv
[
1
]))
if
(
argc
>
1
&&
JSVAL_IS_
NUMBER
(
argv
[
1
]))
JS_ValueToInt32
(
cx
,
argv
[
1
],(
int32
*
)
&
mode
);
sbbs
->
printfile
(
JS_GetStringBytes
(
str
),
mode
);
...
...
src/sbbs3/js_system.c
View file @
d8b66f2d
...
...
@@ -1521,7 +1521,7 @@ static JSBool js_node_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
if
(
getnodedat
(
cfg
,
node_num
,
&
node
,
&
file
))
return
(
JS_TRUE
);
if
(
JSVAL_IS_
INT
(
*
vp
))
if
(
JSVAL_IS_
NUMBER
(
*
vp
))
JS_ValueToInt32
(
cx
,
*
vp
,
&
val
);
tiny
=
JSVAL_TO_INT
(
id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment