style nitpick: I think that it makes it easier to read to break logic tests out into their own lines with the conditional at the end, like this:
```c
if (enif_get_tuple(env, arg, &arity, &tuple_elements) && 
    arity == 2 &&
    enif_get_long(env, tuple_elements[1], &long_ofs))
```