Skip to content

Commit 988fc8b

Browse files
committed
Fixed issue #123?
1 parent 2f90f1c commit 988fc8b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/utilities/conversions.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ class CBaseEntityWrapper;
7171
inline to_type Exc##to_name##From##from_name(from_type from) { \
7272
to_type result; \
7373
if (!to_name##From##from_name(from, result)) { \
74-
const char* str_value = extract<const char*>(str(from)); \
74+
str str_from = str(from); \
75+
const char* str_value = extract<const char*>(str_from); \
7576
BOOST_RAISE_EXCEPTION(PyExc_ValueError, XSTRINGIFY(Conversion from #from_name (%s) to #to_name failed.), str_value); \
7677
} \
7778
return result; \
@@ -81,10 +82,11 @@ class CBaseEntityWrapper;
8182
inline to_type Exc##to_name##From##from_name(from_type from) { \
8283
to_type result; \
8384
if (!to_name##From##from_name(from, result)) { \
84-
const char* str_value = extract<const char*>(str( \
85+
str str_from = str( \
8586
boost::shared_ptr<CBaseEntityWrapper>( \
8687
(CBaseEntityWrapper *) from, \
87-
&NeverDeleteDeleter<CBaseEntityWrapper *>))); \
88+
&NeverDeleteDeleter<CBaseEntityWrapper *>)); \
89+
const char* str_value = extract<const char*>(str_from); \
8890
BOOST_RAISE_EXCEPTION(PyExc_ValueError, XSTRINGIFY(Conversion from #from_name (%s) to #to_name failed.), str_value); \
8991
} \
9092
return result; \

0 commit comments

Comments
 (0)