r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
489 stars 131 forks source link

Replace STRING_PTR with STRING_PTR_RO #1719

Closed yutannihilation closed 1 week ago

yutannihilation commented 1 week ago

This is to fix one of many CRAN Notes related to newly-added "non-API"s.

Version: 1.1.4
Check: compiled code
Result: NOTE
  File ‘rlang/libs/rlang.so’:
    Found non-API calls to R: ‘ENVFLAGS’, ‘FRAME’, ‘HASHTAB’, ‘LEVELS’,
      ‘NAMED’, ‘PRENV’, ‘PRVALUE’, ‘RDEBUG’, ‘R_PromiseExpr’,
      ‘Rf_findVarInFrame3’, ‘SETLENGTH’, ‘SET_BODY’, ‘SET_CLOENV’,
      ‘SET_ENCLOS’, ‘SET_ENVFLAGS’, ‘SET_FORMALS’, ‘SET_GROWABLE_BIT’,
      ‘SET_RDEBUG’, ‘SET_TRUELENGTH’, ‘SET_TYPEOF’, ‘STRING_PTR’,
      ‘XTRUELENGTH’

  Compiled code should not call non-API entry points in R.

(https://cran.r-project.org/web/checks/check_results_rlang.html)

lionel- commented 1 week ago

Thanks!