search for: imports_prefix

Displaying 1 result from an estimated 1 matches for "imports_prefix".

Did you mean: _import_prefix
2014 Oct 17
1
Making parent.env<- an error for package namespaces and package imports
...ean R_IsImportsEnv(SEXP env) +{ + if (isNull(env) || !isEnvironment(env)) + return FALSE; + if (ENCLOS(env) != R_BaseNamespace) + return FALSE; + SEXP name = getAttrib(env, R_NameSymbol); + if (!isString(name) || length(name) != 1) + return FALSE; + + const char *imports_prefix = "imports:"; + const char *name_string = CHAR(STRING_ELT(name, 0)); + if (!strncmp(name_string, imports_prefix, strlen(imports_prefix))) + return TRUE; + else + return FALSE; +} + SEXP attribute_hidden do_parentenvgets(SEXP call, SEXP op, SEXP args, SEXP rho) {...