mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Separate RSTRING_PTR from a function call
Do not apply RSTRING_PTR, a macro which evaluats its argument multiple times, on a function call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
589042c063
commit
21d99677f6
1 changed files with 3 additions and 1 deletions
|
@ -6661,7 +6661,9 @@ tmx_m_of(union DateData *x)
|
||||||
static char *
|
static char *
|
||||||
tmx_m_zone(union DateData *x)
|
tmx_m_zone(union DateData *x)
|
||||||
{
|
{
|
||||||
return RSTRING_PTR(m_zone(x));
|
VALUE zone = m_zone(x);
|
||||||
|
/* TODO: fix potential dangling pointer */
|
||||||
|
return RSTRING_PTR(zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct tmx_funcs tmx_funcs = {
|
static const struct tmx_funcs tmx_funcs = {
|
||||||
|
|
Loading…
Reference in a new issue