[librsvg/librsvg-2.50] Comment on the extra block in to_computed_values so it doesn't get removed by accident.
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.50] Comment on the extra block in to_computed_values so it doesn't get removed by accident.
- Date: Tue, 13 Apr 2021 02:37:31 +0000 (UTC)
commit 3ce21aa4b8c0334d5d4e16058d1ed494c8ea9e57
Author: Federico Mena Quintero <federico mena gmail com>
Date: Thu Feb 25 20:31:24 2021 +0000
Comment on the extra block in to_computed_values
so it doesn't get removed by accident.
rsvg_internals/src/properties.rs | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/rsvg_internals/src/properties.rs b/rsvg_internals/src/properties.rs
index b6e9324b..741a23d9 100644
--- a/rsvg_internals/src/properties.rs
+++ b/rsvg_internals/src/properties.rs
@@ -547,6 +547,10 @@ impl SpecifiedValues {
pub fn to_computed_values(&self, computed: &mut ComputedValues) {
macro_rules! compute {
($name:ident, $field:ident) => {{
+ // This extra block --------^
+ // is so that prop_val will be dropped within the macro invocation;
+ // otherwise all the temporary values cause this function to use
+ // an unreasonably large amount of stack space.
let prop_val = self.get_property(PropertyId::$name);
if let ParsedProperty::$name(s) = prop_val {
computed.set_value(ComputedValue::$name(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]