R/lookup.R

Defines functions attachDescriptorPool

# attaches the descriptor pool to the search path at the given
# position

OTABLE <- NULL
NAMESPACE <- environment()

attachDescriptorPool <- function(pos = 2) {
    if (is.null(OTABLE)) {
        ##unlockBinding( "OTABLE", NAMESPACE )
        otable <- .Call(newProtocolBufferLookup, pos)
        #attach(otable, pos=pos, name="RProtoBuf:DescriptorPool")
        assign("OTABLE", otable, envir = NAMESPACE, inherits = FALSE)
        lockBinding("OTABLE", NAMESPACE )
    }

}
eddelbuettel/rprotobuf documentation built on March 27, 2024, 12:22 p.m.