Skip to content

Commit 5754a7d

Browse files
committed
Change some remaining instances of master
1 parent 9a62c3a commit 5754a7d

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

.github/workflows/format.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
on:
22
push:
3-
branches: master
3+
branches: main
44
pull_request:
55
branches:
6-
- master
6+
- main
77

88
name: format_check
99

@@ -21,4 +21,3 @@ jobs:
2121

2222
- name: Check for a non-empty diff
2323
run: git diff-files -U --exit-code
24-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- badges: start -->
44
[![R-CMD-check](https://github.com/r-lib/cpp11/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/cpp11/actions)
5-
[![codecov](https://codecov.io/gh/r-lib/cpp11/branch/master/graph/badge.svg?token=EEWYoCYxQ2)](https://codecov.io/gh/r-lib/cpp11)
5+
[![codecov](https://codecov.io/gh/r-lib/cpp11/branch/main/graph/badge.svg?token=EEWYoCYxQ2)](https://codecov.io/gh/r-lib/cpp11)
66
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
77
[![CRAN status](https://www.r-pkg.org/badges/version/cpp11)](https://CRAN.R-project.org/package=cpp11)
88
<!-- badges: end -->

vignettes/internals.Rmd

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ Alternatively many IDEs support automatically running `clang-format` every time
6868

6969
## Code organization
7070

71-
cpp11 is a header only library, so all source code exposed to users lives in [inst/include](https://github.com/r-lib/cpp11/tree/master/inst/include).
72-
R code used to register functions and for `cpp11::cpp_source()` is in [R/](https://github.com/r-lib/cpp11/tree/master/R).
73-
Tests for _only_ the code in `R/` is in [tests/testthat/](https://github.com/r-lib/cpp11/tree/master/tests/testthat)
74-
The rest of the code is in a separate [cpp11test/](https://github.com/r-lib/cpp11/tree/master/cpp11test) package included in the source tree.
75-
Inside [cpp11test/src](https://github.com/r-lib/cpp11/tree/master/cpp11test/src) the files that start with `test-` are C++ tests using the [Catch](https://testthat.r-lib.org/reference/use_catch.html) support in testthat.
76-
In addition there are some regular R tests in [cpp11test/tests/testthat/](https://github.com/r-lib/cpp11/tree/master/cpp11test/tests/testthat).
71+
cpp11 is a header only library, so all source code exposed to users lives in [inst/include](https://github.com/r-lib/cpp11/tree/main/inst/include).
72+
R code used to register functions and for `cpp11::cpp_source()` is in [R/](https://github.com/r-lib/cpp11/tree/main/R).
73+
Tests for _only_ the code in `R/` is in [tests/testthat/](https://github.com/r-lib/cpp11/tree/main/tests/testthat)
74+
The rest of the code is in a separate [cpp11test/](https://github.com/r-lib/cpp11/tree/main/cpp11test) package included in the source tree.
75+
Inside [cpp11test/src](https://github.com/r-lib/cpp11/tree/main/cpp11test/src) the files that start with `test-` are C++ tests using the [Catch](https://testthat.r-lib.org/reference/use_catch.html) support in testthat.
76+
In addition there are some regular R tests in [cpp11test/tests/testthat/](https://github.com/r-lib/cpp11/tree/main/cpp11test/tests/testthat).
7777

7878
## Naming conventions
7979

@@ -86,12 +86,12 @@ In addition there are some regular R tests in [cpp11test/tests/testthat/](https:
8686

8787
## Vector classes
8888

89-
All of the basic r_vector classes are class templates, the base template is defined in [cpp11/r_vector.hpp](https://github.com/r-lib/cpp11/blob/master/inst/include/cpp11/r_vector.hpp)
89+
All of the basic r_vector classes are class templates, the base template is defined in [cpp11/r_vector.hpp](https://github.com/r-lib/cpp11/blob/main/inst/include/cpp11/r_vector.hpp)
9090
The template parameter is the type of **value** the particular R vector stores, e.g. `double` for `cpp11::doubles`.
9191
This differs from Rcpp, whose first template parameter is the R vector type, e.g. `REALSXP`.
9292

9393
The file first has the class declarations, then function definitions further down in the file.
94-
Specializations for the various types are in separate files, e.g. [cpp11/doubles.hpp](https://github.com/r-lib/cpp11/blob/master/inst/include/cpp11/doubles.hpp), [cpp11/integers.hpp](https://github.com/r-lib/cpp11/blob/master/inst/include/cpp11/integers.hpp)
94+
Specializations for the various types are in separate files, e.g. [cpp11/doubles.hpp](https://github.com/r-lib/cpp11/blob/main/inst/include/cpp11/doubles.hpp), [cpp11/integers.hpp](https://github.com/r-lib/cpp11/blob/main/inst/include/cpp11/integers.hpp)
9595

9696
## Coercion functions
9797

@@ -100,7 +100,7 @@ There are two different coercion functions
100100
`as_sexp()` takes a C++ object and coerces it to a SEXP object, so it can be used in R.
101101
`as_cpp<>()` is a template function that takes a SEXP and creates a C++ object from it
102102

103-
The various methods for both functions are defined in [cpp11/as.hpp](https://github.com/r-lib/cpp11/blob/master/inst/include/cpp11/as.hpp)
103+
The various methods for both functions are defined in [cpp11/as.hpp](https://github.com/r-lib/cpp11/blob/main/inst/include/cpp11/as.hpp)
104104

105105
This is definitely the most complex part of the cpp11 code, with extensive use of [template metaprogramming](https://en.wikipedia.org/wiki/Template_metaprogramming).
106106
In particular the [substitution failure is not an error (SFINAE)](https://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error) technique is used to control overloading of the functions.
@@ -126,14 +126,14 @@ Calling `preserved.release()` on this returned token will release the protection
126126

127127
This scheme scales in O(1) time to release or insert an object vs O(N) or worse time with `R_PreserveObject()` / `R_ReleaseObject()`.
128128

129-
These functions are defined in [protect.hpp](https://github.com/r-lib/cpp11/blob/master/inst/include/cpp11/protect.hpp)
129+
These functions are defined in [protect.hpp](https://github.com/r-lib/cpp11/blob/main/inst/include/cpp11/protect.hpp)
130130

131131
### Unwind Protect
132132

133133
In R 3.5+ cpp11 uses `R_UnwindProtect` to protect (most) calls to the R API that could fail.
134134
These are usually those that allocate memory, though in truth most R API functions could error along some paths.
135135
If an error happends under `R_UnwindProtect` cpp11 will throw a C++ exception.
136-
This exception is caught by the try catch block defined in the `BEGIN_CPP11` macro in [cpp11/declarations.hpp](https://github.com/r-lib/cpp11/blob/master/inst/include/cpp11/declarations.hpp).
136+
This exception is caught by the try catch block defined in the `BEGIN_CPP11` macro in [cpp11/declarations.hpp](https://github.com/r-lib/cpp11/blob/main/inst/include/cpp11/declarations.hpp).
137137
The exception will cause any C++ destructors to run, freeing any resources held by C++ objects.
138138
After the try catch block exits the R error unwinding is then continued by `R_ContinueUnwind()` and a normal R error results.
139139

vignettes/motivations.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ saveRDS(b_sum, "sum.Rds", version = 2)
312312
knitr::kable(readRDS("sum.Rds"))
313313
```
314314

315-
[cpp11test/src/sum.cpp](https://github.com/r-lib/cpp11/blob/master/cpp11test/src/sum.cpp) contains the code ran in these benchmarks.
315+
[cpp11test/src/sum.cpp](https://github.com/r-lib/cpp11/blob/main/cpp11test/src/sum.cpp) contains the code ran in these benchmarks.
316316

317317
## UTF-8 everywhere
318318

0 commit comments

Comments
 (0)