Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
89681265
Commit
89681265
authored
Oct 15, 2020
by
Loïc Correnson
Browse files
[wp] type utilities
parent
159bca76
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/wp/ctypes.ml
View file @
89681265
...
...
@@ -226,6 +226,9 @@ let pp_object fmt = function
|
C_comp
_
->
Format
.
pp_print_string
fmt
"obj-struct/union"
|
C_array
_
->
Format
.
pp_print_string
fmt
"obj-array"
let
i_name
=
i_memo
(
Pretty_utils
.
to_string
pp_int
)
let
f_name
=
f_memo
(
Pretty_utils
.
to_string
pp_float
)
(* -------------------------------------------------------------------------- *)
(* --- Array Info --- *)
(* -------------------------------------------------------------------------- *)
...
...
@@ -525,8 +528,8 @@ let promote a1 a2 =
"promotion between arithmetics and pointer types"
let
rec
basename
=
function
|
C_int
i
->
Format
.
asprintf
"%a"
pp_int
i
|
C_float
f
->
Format
.
asprintf
"%a"
pp_float
f
|
C_int
i
->
i_name
i
|
C_float
f
->
f_name
f
|
C_pointer
_
->
"pointer"
|
C_comp
c
->
c
.
cname
|
C_array
a
->
...
...
src/plugins/wp/ctypes.mli
View file @
89681265
...
...
@@ -142,6 +142,8 @@ val pp_int : Format.formatter -> c_int -> unit
val
pp_float
:
Format
.
formatter
->
c_float
->
unit
val
pp_object
:
Format
.
formatter
->
c_object
->
unit
val
i_name
:
c_int
->
string
val
f_name
:
c_float
->
string
val
basename
:
c_object
->
string
val
compare
:
c_object
->
c_object
->
int
val
equal
:
c_object
->
c_object
->
bool
...
...
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