View | Details | Raw Unified | Return to bug 16490 | Differences between
and this patch

Collapse All | Expand All

(-)src/library/base/R/attach.R (-3 / +3 lines)
Lines 52-58 Link Here
52
                break
52
                break
53
            }
53
            }
54
        }
54
        }
55
        ob <- objects(db.pos, all.names = TRUE)
55
        ob <- names(db.pos)
56
        if(.isMethodsDispatchOn()) { ## {see note in library() about this}
56
        if(.isMethodsDispatchOn()) { ## {see note in library() about this}
57
            these <- ob[substr(ob, 1L, 6L) == ".__T__"]
57
            these <- ob[substr(ob, 1L, 6L) == ".__T__"]
58
            gen  <- gsub(".__T__(.*):([^:]+)", "\\1", these)
58
            gen  <- gsub(".__T__(.*):([^:]+)", "\\1", these)
Lines 62-69 Link Here
62
        }
62
        }
63
        ipos <- seq_along(sp)[-c(db.pos, match(c("Autoloads", "CheckExEnv"), sp, 0L))]
63
        ipos <- seq_along(sp)[-c(db.pos, match(c("Autoloads", "CheckExEnv"), sp, 0L))]
64
        for (i in ipos) {
64
        for (i in ipos) {
65
            obj.same <- match(objects(i, all.names = TRUE), ob, nomatch = 0L)
65
            obj.same <- match(names(i), ob, nomatch = 0L)
66
            if (any(obj.same > 0L)) {
66
            if (sum(obj.same) > 0L) {
67
                same <- ob[obj.same]
67
                same <- ob[obj.same]
68
                same <- same[!(same %in% dont.mind)]
68
                same <- same[!(same %in% dont.mind)]
69
                Classobjs <- grep("^\\.__", same)
69
                Classobjs <- grep("^\\.__", same)
(-)src/library/base/R/library.R (-3 / +3 lines)
Lines 167-173 Link Here
167
        sp <- search()
167
        sp <- search()
168
        lib.pos <- match(pkgname, sp)
168
        lib.pos <- match(pkgname, sp)
169
        ## ignore generics not defined for the package
169
        ## ignore generics not defined for the package
170
        ob <- objects(lib.pos, all.names = TRUE)
170
        ob <- names(lib.pos)
171
        if(!nogenerics) {
171
        if(!nogenerics) {
172
            ##  Exclude generics that are consistent with implicit generic
172
            ##  Exclude generics that are consistent with implicit generic
173
            ## from another package.  A better test would be to move this
173
            ## from another package.  A better test would be to move this
Lines 183-190 Link Here
183
	ipos <- seq_along(sp)[-c(lib.pos,
183
	ipos <- seq_along(sp)[-c(lib.pos,
184
				 match(c("Autoloads", "CheckExEnv"), sp, 0L))]
184
				 match(c("Autoloads", "CheckExEnv"), sp, 0L))]
185
        for (i in ipos) {
185
        for (i in ipos) {
186
            obj.same <- match(objects(i, all.names = TRUE), ob, nomatch = 0L)
186
            obj.same <- match(names(i), ob, nomatch = 0L)
187
            if (any(obj.same > 0)) {
187
            if (sum(obj.same) > 0L) {
188
                same <- ob[obj.same]
188
                same <- ob[obj.same]
189
                same <- same[!(same %in% dont.mind)]
189
                same <- same[!(same %in% dont.mind)]
190
                Classobjs <- grep("^\\.__", same)
190
                Classobjs <- grep("^\\.__", same)
(-)src/library/base/R/namespace.R (-1 / +2 lines)
Lines 1-3 Link Here
1
1
#  File src/library/base/R/namespace.R
2
#  File src/library/base/R/namespace.R
2
#  Part of the R package, http://www.R-project.org
3
#  Part of the R package, http://www.R-project.org
3
#
4
#
Lines 988-994 Link Here
988
                 call. = FALSE, domain = NA)
989
                 call. = FALSE, domain = NA)
989
        }
990
        }
990
    }
991
    }
991
    expnames <- unlist(lapply(expnames, get, envir = exports, inherits = FALSE))
992
    expnames <- unlist(mget(expnames, envir = exports, inherits = FALSE))
992
    if (is.null(impnames)) impnames <- character()
993
    if (is.null(impnames)) impnames <- character()
993
    if (is.null(expnames)) expnames <- character()
994
    if (is.null(expnames)) expnames <- character()
994
    .Internal(importIntoEnv(impenv, impnames, expenv, expnames))
995
    .Internal(importIntoEnv(impenv, impnames, expenv, expnames))

Return to bug 16490