Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
52121bc6
Commit
52121bc6
authored
8 months ago
by
Thibault Martin
Committed by
Andre Maroneze
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] Remove deprecated Integer functions
parent
0892d5a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libraries/stdlib/integer.ml
+3
-9
3 additions, 9 deletions
src/libraries/stdlib/integer.ml
src/libraries/stdlib/integer.mli
+0
-21
0 additions, 21 deletions
src/libraries/stdlib/integer.mli
with
3 additions
and
30 deletions
src/libraries/stdlib/integer.ml
+
3
−
9
View file @
52121bc6
...
...
@@ -105,12 +105,6 @@ let to_int_exn = Z.to_int
let
to_int64_exn
=
Z
.
to_int64
let
to_int32_exn
=
Z
.
to_int32
(* These functions are deprecated (renamed to *_exn) and will be removed
in a future version. *)
let
to_int
=
to_int_exn
let
to_int64
=
to_int64_exn
let
to_int32
=
to_int32_exn
let
wrap
to_int
i
=
try
Some
(
to_int
i
)
with
Z
.
Overflow
->
None
let
to_int_opt
=
wrap
Z
.
to_int
let
to_int64_opt
=
wrap
Z
.
to_int64
...
...
@@ -202,9 +196,9 @@ let pretty_hex fmt v =
if
gt
v
two_power_60
then
let
quo
,
rem
=
Z
.
ediv_rem
v
two_power_60
in
aux
quo
;
Format
.
fprintf
fmt
"%015LX"
(
to_int64
rem
)
Format
.
fprintf
fmt
"%015LX"
(
to_int64
_exn
rem
)
else
Format
.
fprintf
fmt
"%LX"
(
to_int64
v
)
Format
.
fprintf
fmt
"%LX"
(
to_int64
_exn
v
)
in
if
equal
v
zero
then
Format
.
pp_print_string
fmt
"0"
else
if
gt
v
zero
then
(
Format
.
pp_print_string
fmt
"0x"
;
aux
v
)
...
...
@@ -229,7 +223,7 @@ let length u v = succ (sub v u)
let
extract_bits
~
start
~
stop
v
=
assert
(
ge
start
zero
&&
ge
stop
start
);
(*Format.printf "%a[%a..%a]@\n" pretty v pretty start pretty stop;*)
let
r
=
Z
.
extract
v
(
to_int
start
)
(
to_int
(
length
start
stop
))
in
let
r
=
Z
.
extract
v
(
to_int
_exn
start
)
(
to_int
_exn
(
length
start
stop
))
in
(*Format.printf "%a[%a..%a]=%a@\n" pretty v pretty start pretty stop pretty r;*)
r
...
...
This diff is collapsed.
Click to expand it.
src/libraries/stdlib/integer.mli
+
0
−
21
View file @
52121bc6
...
...
@@ -124,27 +124,6 @@ val of_int : int -> t
val
of_int64
:
Int64
.
t
->
t
val
of_int32
:
Int32
.
t
->
t
(**
@raise Z.Overflow if too big
@deprecated 24.0-Chromium Renamed to [to_int_exn].
Also consider using [to_int_opt].
*)
val
to_int
:
t
->
int
[
@@
deprecated
]
(**
@raise Z.Overflow if too big
@deprecated 24.0-Chromium Renamed to [to_int64_exn].
Also consider using [to_int64_opt].
*)
val
to_int64
:
t
->
int64
[
@@
deprecated
]
(**
@raise Z.Overflow if too big
@deprecated 24.0-Chromium Renamed to [to_int32_exn].
Also consider using [to_int32_opt].
*)
val
to_int32
:
t
->
int32
[
@@
deprecated
]
(**
@raise Z.Overflow if too big
@since 24.0-Chromium
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment