Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
061c747b
Commit
061c747b
authored
Nov 17, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use the standard isfinite() function.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1f273618
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
12 deletions
+6
-12
global.c
dlls/jscript/global.c
+1
-1
jscript.h
dlls/jscript/jscript.h
+0
-1
json.c
dlls/jscript/json.c
+1
-1
jsutils.c
dlls/jscript/jsutils.c
+0
-5
number.c
dlls/jscript/number.c
+4
-4
No files found.
dlls/jscript/global.c
View file @
061c747b
...
...
@@ -238,7 +238,7 @@ static HRESULT JSGlobal_isFinite(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
if
(
FAILED
(
hres
))
return
hres
;
ret
=
is
_
finite
(
n
);
ret
=
isfinite
(
n
);
}
if
(
r
)
...
...
dlls/jscript/jscript.h
View file @
061c747b
...
...
@@ -364,7 +364,6 @@ HRESULT variant_change_type(script_ctx_t*,VARIANT*,VARIANT*,VARTYPE) DECLSPEC_HI
HRESULT
decode_source
(
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
double_to_string
(
double
,
jsstr_t
**
)
DECLSPEC_HIDDEN
;
BOOL
is_finite
(
double
)
DECLSPEC_HIDDEN
;
static
inline
BOOL
is_digit
(
WCHAR
c
)
{
...
...
dlls/jscript/json.c
View file @
061c747b
...
...
@@ -700,7 +700,7 @@ static HRESULT stringify(stringify_ctx_t *ctx, jsval_t val)
}
case
JSV_NUMBER
:
{
double
n
=
get_number
(
value
);
if
(
is
_
finite
(
n
))
{
if
(
isfinite
(
n
))
{
const
WCHAR
*
ptr
;
jsstr_t
*
str
;
...
...
dlls/jscript/jsutils.c
View file @
061c747b
...
...
@@ -51,11 +51,6 @@ const char *debugstr_jsval(const jsval_t v)
return
NULL
;
}
BOOL
is_finite
(
double
n
)
{
return
!
isnan
(
n
)
&&
!
isinf
(
n
);
}
#define MIN_BLOCK_SIZE 128
#define ARENA_FREE_FILLER 0xaa
...
...
dlls/jscript/number.c
View file @
061c747b
...
...
@@ -247,7 +247,7 @@ static HRESULT Number_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, u
val
=
number
->
value
;
if
(
radix
==
10
||
!
is
_
finite
(
val
))
{
if
(
radix
==
10
||
!
isfinite
(
val
))
{
hres
=
to_string
(
ctx
,
jsval_number
(
val
),
&
str
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -373,7 +373,7 @@ static HRESULT Number_toFixed(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un
}
val
=
number
->
value
;
if
(
!
is
_
finite
(
val
))
{
if
(
!
isfinite
(
val
))
{
hres
=
to_string
(
ctx
,
jsval_number
(
val
),
&
str
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -414,7 +414,7 @@ static HRESULT Number_toExponential(script_ctx_t *ctx, vdisp_t *jsthis, WORD fla
}
val
=
number
->
value
;
if
(
!
is
_
finite
(
val
))
{
if
(
!
isfinite
(
val
))
{
hres
=
to_string
(
ctx
,
jsval_number
(
val
),
&
str
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -455,7 +455,7 @@ static HRESULT Number_toPrecision(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
}
val
=
number
->
value
;
if
(
!
is
_
finite
(
val
)
||
!
prec
)
{
if
(
!
isfinite
(
val
)
||
!
prec
)
{
hres
=
to_string
(
ctx
,
jsval_number
(
val
),
&
str
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
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