File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 253
253
# Dataspace constants
254
254
@defconstants H5S begin
255
255
# atomic data types
256
- ALL:: hid_t = 0
257
- UNLIMITED:: hid_t = typemax (hsize_t)
256
+ ALL:: hsize_t = 0
257
+ UNLIMITED:: hsize_t = typemax (hsize_t)
258
258
259
259
# Types of dataspaces (C enum H5S_class_t)
260
260
SCALAR:: hid_t = hid_t (0 )
Original file line number Diff line number Diff line change @@ -64,8 +64,12 @@ macro defconstants(prefix::Symbol, expr::Expr)
64
64
# Save type for later use
65
65
push! (imports, type)
66
66
67
- value = isruntime ? esc (:(Ref {$type} ())) :
68
- QuoteNode (Core. eval (__module__, line. args[2 ]))
67
+ if isruntime
68
+ value = esc (:(Ref {$type} ()))
69
+ else
70
+ valexpr = :(convert ($ type, $ (line. args[2 ])))
71
+ value = QuoteNode (Core. eval (__module__, valexpr))
72
+ end
69
73
fullname = esc (:($ innermod.$ name))
70
74
getexpr = isruntime ? :($ (fullname)[]) : fullname
71
75
You can’t perform that action at this time.
0 commit comments