src/export/exported.c
sexp* rlang_named(sexp* x, sexp* env) {
  int n_protect = 0;

  x = PROTECT(Rf_findVarInFrame3(env, x, FALSE));
  ++n_protect;

  if (TYPEOF(x) == PROMSXP) {
    x = PROTECT(Rf_eval(x, env));
    ++n_protect;
  }

  UNPROTECT(n_protect);
  return Rf_ScalarInteger(NAMED(x));
}
// Picks up symbols from parent environment to avoid bumping namedness
// during promise resolution
Picks up symbols from parent environment to avoid bumping namedness
during promise resolution
Picks up symbols from parent environment to avoid bumping namedness during promise resolution
sexp* rlang_named(sexp* x, sexp* env) {
  int n_protect = 0;
  x = PROTECT(Rf_findVarInFrame3(env, x, FALSE));
  ++n_protect;
  if (TYPEOF(x) == PROMSXP) {
    x = PROTECT(Rf_eval(x, env));
    ++n_protect;
  }
  UNPROTECT(n_protect);
  return Rf_ScalarInteger(NAMED(x));
}
sexp * rlang_named ( sexp * x , sexp * env ) { int n_protect = 0 ; x = PROTECT ( Rf_findVarInFrame3 ( env , x , FALSE ) ) ; ++ n_protect ; if ( TYPEOF ( x ) == PROMSXP ) { x = PROTECT ( Rf_eval ( x , env ) ) ; ++ n_protect ; } UNPROTECT ( n_protect ) ; return Rf_ScalarInteger ( NAMED ( x ) ) ; }
Picks up symbols from parent environment to avoid bumping namedness
during promise resolution
Picks up symbols from parent environment to avoid bumping namedness during promise resolution