Skip to content

Commit

Permalink
IdItem::itemName segfaults if modified, so declare it constant. Fixes…
Browse files Browse the repository at this point in the history
… a deprecation warning also.
  • Loading branch information
djcsdy committed Nov 3, 2009
1 parent d0ec739 commit c307caa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SWFIdItem.h
Expand Up @@ -77,7 +77,7 @@ class IdItem : public Item {
static Description Registry[];
static int nRegistered;

static char* itemName;
static const char* itemName;
};

}
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/basics.xsl
Expand Up @@ -39,7 +39,7 @@
};
template&lt;&gt; int IdItem&lt;<xsl:value-of select="$class"/>&gt;::nRegistered = <xsl:value-of select="count(*[name() = $tag])"/>;

template&lt;&gt; char* IdItem&lt;<xsl:value-of select="$class"/>&gt;::itemName = "<xsl:value-of select="$itemName"/>";
template&lt;&gt; const char* IdItem&lt;<xsl:value-of select="$class"/>&gt;::itemName = "<xsl:value-of select="$itemName"/>";

</xsl:template>

Expand Down

0 comments on commit c307caa

Please sign in to comment.