# What means 'at' and 'rt' in \`@cfunction\`?

**URL:** <https://discourse.julialang.org/t/what-means-at-and-rt-in-cfunction/32345>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 16, 2019, 6:24pm UTC](https://discourse.julialang.org/t/what-means-at-and-rt-in-cfunction/32345 "2019-12-16T18:24:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swissr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swissr/32/208_2.png) [@swissr](https://discourse.julialang.org/u/swissr)\
**Post date:** [December 16, 2019, 6:24pm UTC](https://discourse.julialang.org/t/what-means-at-and-rt-in-cfunction/32345/1 "2019-12-16T18:24:13Z")

</div>

A tiny detail, but I wonder, for what the “at” and “rt” argument names stand in the cfunction macro?

From the help (`@cfunction(callable, ReturnType, (ArgumentTypes...,)) -> Ptr{Cvoid}`…) I would have thought “argument type” and “return type”, but from the code (which I don’t fully understand) it seems to be switched.

[Here](https://github.com/JuliaLang/julia/commit/81f652439417f035c42873dbb2d41dfcdd84f827) is the commit where the code changed

```julia
- cfunction(f, r, a) = ccall(:jl_function_ptr, Ptr{Cvoid}, (Any, Any, Any), f, r, a)
+ macro cfunction(f, at, rt)
    if !(isa(rt, Expr) && rt.head === :tuple)
        throw(ArgumentError("@cfunction argument types must be a literal tuple"))
    end
    rt.head = :call
    ...
    cfun = Expr(:cfunction, typ, fptr, at, rt, QuoteNode(:ccall))
    ...

```

---

<div class="post-metadata">

**Author:** ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)\
**Post date:** [December 16, 2019, 7:48pm UTC](https://discourse.julialang.org/t/what-means-at-and-rt-in-cfunction/32345/2 "2019-12-16T19:48:40Z")

</div>

[https://github.com/JuliaLang/julia/pull/33267](https://github.com/JuliaLang/julia/pull/33267)

---

<div class="post-metadata">

**Author:** ![swissr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swissr/32/208_2.png) [@swissr](https://discourse.julialang.org/u/swissr)\
**Post date:** [December 16, 2019, 9:56pm UTC](https://discourse.julialang.org/t/what-means-at-and-rt-in-cfunction/32345/3 "2019-12-16T21:56:29Z")

</div>

…and just merged a few minutes ago. No more confusion 😍
