Understand Macro interconnections in OpenCL.jl package

When you look in the OpenCL implementation code you stumble upon two macros one is ‘’‘@check’‘’ define in src/ macros.jl the other one ‘’‘@ocl_func’‘’. @check is responsible for running the clfunc => $(esc(clfunc)), but it is the @ocl_func (in api.jl) macro that will trigger the ccall of the given clfunc. My question how does the clfunc, for example this one: @check api.clGetPlatformIDs(0, C_NULL, nplatforms) (in platforms.jl) is passed to the @ocl_func macro? Is it implicit( because the ocl macro is define in api so every function called with api.will activate the macro (in the example it will be then @ocl_func(clGetPlatformIDs(0, C_NULL, nplatforms)) )? I cannot find the code which is directing this passage. Clarifying this will help me to understand how macros work.