@@ -3,38 +3,38 @@ macro gdal(args...)
3
3
@assert args[1 ]. head == :(:: )
4
4
fhead = (args[1 ]. args[1 ], GDAL. libgdal)
5
5
returntype = args[1 ]. args[2 ]
6
- argtypes = Expr (:tuple , [a. args[2 ] for a in args[2 : end ]]. .. )
7
- args = [a. args[1 ] for a in args[2 : end ]]
6
+ argtypes = Expr (:tuple , [esc ( a. args[2 ]) for a in args[2 : end ]]. .. )
7
+ args = [esc ( a. args[1 ]) for a in args[2 : end ]]
8
8
return quote ccall ($ fhead, $ returntype, $ argtypes, $ (args... )) end
9
9
end
10
10
11
11
macro ogrerr (code, message)
12
12
return quote
13
- if $ code != GDAL. OGRERR_NONE
13
+ if $ ( esc ( code)) != GDAL. OGRERR_NONE
14
14
error ($ message)
15
15
end
16
16
end
17
17
end
18
18
19
19
macro cplerr (code, message)
20
20
return quote
21
- if $ code != GDAL. CE_None
21
+ if $ ( esc ( code)) != GDAL. CE_None
22
22
error ($ message)
23
23
end
24
24
end
25
25
end
26
26
27
27
macro cplwarn (code, message)
28
28
return quote
29
- if $ code != GDAL. CE_None
29
+ if $ ( esc ( code)) != GDAL. CE_None
30
30
warn ($ message)
31
31
end
32
32
end
33
33
end
34
34
35
35
macro cplprogress (progressfunc)
36
36
return quote
37
- cfunction ($ progressfunc,Cint,(Cdouble,Cstring,Ptr{Void}))
37
+ cfunction ($ ( esc ( progressfunc)) ,Cint,(Cdouble,Cstring,Ptr{Void}))
38
38
end
39
39
end
40
40
0 commit comments