[librsvg: 2/3] 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: 2/3] Comment on the extra block in to_computed_values so it doesn't get removed by accident.
- Date: Thu, 25 Feb 2021 20:55:42 +0000 (UTC)
commit 552a88a11036b4c9449dc1f00400b932eaf35041
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.
src/properties.rs | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/properties.rs b/src/properties.rs
index a0cc2886..a2b94ee4 100644
--- a/src/properties.rs
+++ b/src/properties.rs
@@ -550,6 +550,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]