unsafe fn env_binding(env: SEXP, name: &CStr) -> Option<SEXP>Expand description
Look up a variable bound directly in a single environment frame (no search
of enclosing frames — R_getVarEx with inherits = FALSE, the API-blessed
replacement for the removed Rf_findVarInFrame).
Returns None if env is not itself an environment, or if name has no
binding in it. Active bindings are forced transparently by R, same as any
other variable read. Note: R_getVarEx longjmps (raises an R error) if
the binding turns out to be R_MissingArg — pathological for the
.ptr/.__enclos_env__/private handle lookups this function serves,
and acceptable here since callers run under the framework’s unwind
protection.
§Safety
Must be called from R’s main thread.