Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e699eca

Browse files
spgarbetcran-robot
authored andcommittedJul 5, 2024
version 2.3.9
1 parent d418007 commit e699eca

File tree

5 files changed

+30
-16
lines changed

5 files changed

+30
-16
lines changed
 

‎DESCRIPTION

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
Package: yaml
22
Type: Package
33
Title: Methods to Convert R Data to YAML and Back
4-
Date: 2023-11-28
5-
Version: 2.3.8
4+
Date: 2024-07-05
5+
Version: 2.3.9
66
Suggests: RUnit
77
Author: Shawn P Garbett [aut], Jeremy Stephens [aut, cre], Kirill Simonov [aut], Yihui Xie [ctb],
88
Zhuoer Dong [ctb], Hadley Wickham [ctb], Jeffrey Horner [ctb], reikoch [ctb],
99
Will Beasley [ctb], Brendan O'Connor [ctb], Gregory R. Warnes [ctb],
10-
Michael Quinn [ctb], Zhian N. Kamvar [ctb]
10+
Michael Quinn [ctb], Zhian N. Kamvar [ctb], Charlie Gao [ctb]
1111
Maintainer: Shawn Garbett <shawn.garbett@vumc.org>
1212
License: BSD_3_clause + file LICENSE
1313
Description: Implements the 'libyaml' 'YAML' 1.1 parser and emitter
1414
(<https://pyyaml.org/wiki/LibYAML>) for R.
1515
URL: https://github.com/vubiostat/r-yaml/
1616
BugReports: https://github.com/vubiostat/r-yaml/issues
1717
NeedsCompilation: yes
18-
Packaged: 2023-12-11 16:46:09 UTC; garbetsp
18+
Packaged: 2024-07-05 14:37:49 UTC; garbetsp
1919
Repository: CRAN
20-
Date/Publication: 2023-12-11 18:50:02 UTC
20+
Date/Publication: 2024-07-05 16:30:02 UTC

‎MD5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
bbba10d958545e3425cc20f316d9da75 *COPYING
2-
eceb0a0787e1e53016d4650fb3a4599e *DESCRIPTION
2+
6604e5be6f72cfd7262278d024da7ea0 *DESCRIPTION
33
59797fdd34baf532ba0e4c97bc5e3cf8 *LICENSE
44
84e3c05130718b3c373f57fbb809cb86 *NAMESPACE
55
b901a42735294b31cf1d91b526714858 *R/as.yaml.R
@@ -23,17 +23,17 @@ f6e8413262b60d2b926f4cbad12b1bed *inst/tests/test_yaml_load_file.R
2323
11563d3fabb3788f025131444aa35e8b *man/read_yaml.Rd
2424
0b2030532868feea28c54a3600fddaa9 *man/verbatim_logical.Rd
2525
466b1a01bd0eead68a25633559e01ad3 *man/write_yaml.Rd
26-
baab030c01a0f2f7eeb99c8d7355c014 *man/yaml.load.Rd
26+
0bc574ee3d2e29384ea279c4f196f0ab *man/yaml.load.Rd
2727
6b0576349be43cf3d872205b41aff77d *src/Makevars
2828
67daa508265c6140db6d048c9a587978 *src/api.c
2929
a2657fec1bbeca766a5e1cb0a9458a05 *src/dumper.c
3030
a085415195f7814d2bbca52ec4e517d1 *src/emitter.c
3131
9cfda206be239794d470b8148bbc9a69 *src/implicit.c
3232
adea9625fc3b724041e4a5e3947392f8 *src/loader.c
3333
9c4f0181665c37d4bcdd05535e6a2130 *src/parser.c
34-
d6194640ed6d599c41f297906c68533f *src/r_emit.c
34+
d7543ba902b6e98b49fecc0f3276e0a1 *src/r_emit.c
3535
54485eec23a3e3416821863f93d97753 *src/r_ext.c
36-
acc43ebc0942c7ec36f4f13ef2fc4747 *src/r_ext.h
36+
f5356570d02218afeeb754a9827ec9e5 *src/r_ext.h
3737
d12dfca0fc247f8cc9e48e60bef17429 *src/r_parse.c
3838
efcea8b4a8bcfbc96ae32abd0f18e472 *src/reader.c
3939
830f57f176e768c7fa97d086de18050d *src/scanner.c

‎man/yaml.load.Rd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757

5858
There is a built-in handler that will evaluate expressions that are tagged
5959
with the \sQuote{!expr} tag. Currently this handler is disabled by default
60-
for security reasons. If a \sQuote{!expr} tag exists and this is set to
60+
for security reasons. If a \sQuote{!expr} tag exists and this is set to
6161
FALSE a warning will occur. Alternately, you can set the option named
62-
\sQuote{yaml.eval.expr} via the \code{options} function to turn on
62+
\sQuote{yaml.eval.expr} via the \code{options} function to turn on
6363
evaluation.
6464

6565
The \code{merge.precedence} parameter controls how merge keys are handled.
@@ -115,7 +115,7 @@
115115
# handling custom types
116116
yaml.load("!sqrt 555", handlers=list(sqrt=function(x) { sqrt(as.integer(x)) }))
117117
yaml.load("!foo\n- 1\n- 2", handlers=list(foo=function(x) { as.integer(x) + 1 }))
118-
yaml.load("!bar\none: 1\ntwo: 2", handlers=list(foo=function(x) { x$one <- "one"; x }))
118+
yaml.load("!bar\none: 1\ntwo: 2", handlers=list(bar=function(x) { x$one <- "one"; x }))
119119

120120
# loading R expressions
121121
# NOTE: this will not be done by default in the near future

‎src/r_emit.c

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ typedef struct {
1111
size_t capa;
1212
} s_emitter_output;
1313

14+
#if R_VERSION < R_Version(4, 5, 0)
Code has comments. Press enter to view.
15+
16+
# define R_ClosureFormals(x) FORMALS(x)
17+
# define R_ClosureBody(x) BODY(x)
18+
# define R_ClosureEnv(x) CLOENV(x)
19+
20+
static inline SEXP R_mkClosure(SEXP formals, SEXP body, SEXP env) {
21+
SEXP fun = Rf_allocSExp(CLOSXP);
22+
SET_FORMALS(fun, formals);
23+
SET_BODY(fun, body);
24+
SET_CLOENV(fun, env);
25+
return fun;
26+
}
27+
28+
#endif
29+
1430
static SEXP Ryaml_deparse_function(SEXP s_obj)
1531
{
1632
SEXP s_new_obj = NULL, s_call = NULL, s_result = NULL, s_chr = NULL;
@@ -20,10 +36,7 @@ static SEXP Ryaml_deparse_function(SEXP s_obj)
2036
/* Copy function without any attributes */
2137
if (TYPEOF(s_obj) == CLOSXP) {
2238
PROTECT(s_obj);
23-
PROTECT(s_new_obj = allocSExp(CLOSXP));
24-
SET_FORMALS(s_new_obj, FORMALS(s_obj));
25-
SET_BODY(s_new_obj, BODY(s_obj));
26-
SET_CLOENV(s_new_obj, CLOENV(s_obj));
39+
PROTECT(s_new_obj = R_mkClosure(R_ClosureFormals(s_obj), R_ClosureBody(s_obj), R_ClosureEnv(s_obj)));
2740
SET_OBJECT(s_new_obj, OBJECT(s_obj));
2841
UNPROTECT(2);
2942
s_obj = s_new_obj;

‎src/r_ext.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <limits.h>
1313
#include "R.h"
1414
#include "Rdefines.h"
15+
#include "Rversion.h"
1516
#include "R_ext/Rdynload.h"
1617
#include "R_ext/Parse.h"
1718
#include "R_ext/Print.h"

0 commit comments

Comments
 (0)
Please sign in to comment.