berns 4.1.1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/berns/berns.c +7 -2
- data/lib/berns/berns.bundle +0 -0
- data/lib/berns/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4a8fe33f6e2f7e69c6d02de7eb682b9b0eb7b41799b911e4579284b7d758255
|
4
|
+
data.tar.gz: 3e4571f154a5a1bceef2502642dbf42dbfd12e7daf2f6fa8183fdda45598088c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac43b2a7659ba8806dff8d7457b175632dbd38f75d771acd3f6bf4e97c3974de031a88334d95248f98ce71d2ebf0b761c65bc33856df0beb3cb5f874a604b36e
|
7
|
+
data.tar.gz: f70c88f8dd2f4c3d06f84748d54536f066f19a4d77d4e27c6fa70121a4b49a04fbf94ea27c87e9fbe9340b9e6ae8a2384c1378644c4f300561b1ff4a13ce69c4
|
data/ext/berns/berns.c
CHANGED
@@ -173,9 +173,9 @@ static VALUE external_escape_html(RB_UNUSED_VAR(VALUE self), VALUE string) {
|
|
173
173
|
/*
|
174
174
|
* Return a freeable piece of memory with a copy of the attribute passed in it.
|
175
175
|
* Why does this exist? So we can free the memory created by this without having
|
176
|
-
* branch further in other places.
|
176
|
+
* to branch further in other places.
|
177
177
|
*/
|
178
|
-
static char * empty_value_to_attribute(const char *attr, const size_t attrlen) {
|
178
|
+
static inline char * empty_value_to_attribute(const char *attr, const size_t attrlen) {
|
179
179
|
size_t total_size = attrlen + 1;
|
180
180
|
char *dest = malloc(total_size);
|
181
181
|
char *end = dest + total_size;
|
@@ -465,6 +465,9 @@ static VALUE external_to_attributes(RB_UNUSED_VAR(VALUE self), VALUE attributes)
|
|
465
465
|
return rstring;
|
466
466
|
}
|
467
467
|
|
468
|
+
/*
|
469
|
+
* Create a void element i.e. one without children/content.
|
470
|
+
*/
|
468
471
|
static char * void_element(const char *tag, size_t tlen, VALUE attributes) {
|
469
472
|
const char *empty = "";
|
470
473
|
char *attrs = hash_value_to_attribute(empty, 0, attributes);
|
@@ -491,6 +494,8 @@ static char * void_element(const char *tag, size_t tlen, VALUE attributes) {
|
|
491
494
|
|
492
495
|
ptr = stecpy(ptr, tag_close, end);
|
493
496
|
|
497
|
+
free(attrs);
|
498
|
+
|
494
499
|
return dest;
|
495
500
|
}
|
496
501
|
|
data/lib/berns/berns.bundle
CHANGED
Binary file
|
data/lib/berns/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Beck
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A utility library for generating HTML strings.
|
15
15
|
email:
|