<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<p>Hi Rémi,</p>
<p>Just earlier today I discussed the patch in question with <em>tguillem</em>, and at first I decided “nhaa, let’s forget about it - it’s not too important” but for some reason my mind went back to “aw what the heck, let’s include it” when I issued <code>git format-patch</code>.</p>
<p>On 2016-10-12 22:30, Rémi Denis-Courmont wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Hello,</code></pre>
</blockquote>
<p>The more I think about it, the less I am able to come up with a rationale that holds water for the patch in question.</p>
<p>I decided to include it based on the fact that var_Create can be somewhat expensive (and disregarding it if the variable exists could save a few cycles), but that is a micro optimization at best, and I have not even benchmarked it (painfully honest).</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> I don't think that's correct, insofar as the existing lifecycle model for
variables is retained. I also don't really see the point.</code></pre>
</blockquote>
<p>The patch can be safely dropped as it is not important to the real cause for the patch-set.</p>
<p>Thank you for your input!</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Le mercredi 12 octobre 2016, 19:39:37 Filip Roséen a écrit :</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> ---
src/config/chain.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/config/chain.c b/src/config/chain.c
index 7d0b71d..e20585d 100644
--- a/src/config/chain.c
+++ b/src/config/chain.c
@@ -281,9 +281,13 @@ void config_ChainParse( vlc_object_t *p_this, const
char *psz_prefix,
char name[plen + strlen( optname )];
snprintf( name, sizeof (name), "%s%s", psz_prefix, optname );
- if( var_Create( p_this, name,
- config_GetType( p_this, name ) | VLC_VAR_DOINHERIT
) ) - return /* VLC_xxx */;
+
+ if( var_Type( p_this, name ) == 0 )
+ {
+ if( var_Create( p_this, name, config_GetType( p_this, name ) |
+ VLC_VAR_DOINHERIT ) )
+ return /* VLC_xxx */;
+ }
}
/* Now parse options and set value */</code></pre>
</blockquote>
<pre><code> --
Rémi Denis-Courmont
http://www.remlab.net/
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
https://mailman.videolan.org/listinfo/vlc-devel</code></pre>
</blockquote>
</body>
</html>