Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Issue 1508036: Add signals to generated header file (Closed)

Created:
10 years, 8 months ago by Jason Glasgow
Modified:
9 years, 7 months ago
Reviewers:
rochberg
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

Add signals to generated header file

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
header-generator.xsl View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Jason Glasgow
This exposes the signal names as macros so that connman can use macros instead of ...
10 years, 8 months ago (2010-04-14 14:14:07 UTC) #1
rochberg
10 years, 8 months ago (2010-04-14 14:17:40 UTC) #2
LGTM

On Wed, Apr 14, 2010 at 10:14 AM, <jglasgow@chromium.org> wrote:

> Reviewers: rochberg,
>
> Message:
> This exposes the signal names as macros so that connman can use macros
> instead
> of string constants.  This should prevent typos -- or at least catch typos
> at
> compile time.
>
> Description:
> Add signals to generated header file
>
> Please review this at http://codereview.chromium.org/1508036/show
>
> Affected files:
>  header-generator.xsl
>
>
> Index: header-generator.xsl
> diff --git a/header-generator.xsl b/header-generator.xsl
> index
>
c32f4b650f64acd40b2884aa2caae340582fffab..36255f34d18297188517c6ee72e0d9e3c5f7b6bc
> 100644
> --- a/header-generator.xsl
> +++ b/header-generator.xsl
> @@ -137,6 +137,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
> MA  02110-1301  USA
>   </xsl:template>
>
>   <xsl:template match="signal">
> +    <xsl:variable name="varname">
> +      <xsl:value-of select="translate(@name,
> +                           'abcdefghijklmnopqrstuvwxyz. ',
> +                           'ABCDEFGHIJKLMNOPQRSTUVWXYZ_')"/>
> +    </xsl:variable>
> +#define <xsl:value-of select="concat('MM_SIGNAL_', $varname)"/>
> "<xsl:value-of select="@name"/>"
> +
>   </xsl:template>
>
>   <xsl:template match="method">
>
>
>

Powered by Google App Engine
This is Rietveld 408576698