File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ class CBaseEntityWrapper;
71
71
inline to_type Exc##to_name##From##from_name(from_type from) { \
72
72
to_type result; \
73
73
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); \
75
76
BOOST_RAISE_EXCEPTION (PyExc_ValueError, XSTRINGIFY (Conversion from #from_name (%s) to #to_name failed.), str_value); \
76
77
} \
77
78
return result; \
@@ -81,10 +82,11 @@ class CBaseEntityWrapper;
81
82
inline to_type Exc##to_name##From##from_name(from_type from) { \
82
83
to_type result; \
83
84
if (!to_name##From##from_name (from, result)) { \
84
- const char * str_value = extract< const char *>( str ( \
85
+ str str_from = str ( \
85
86
boost::shared_ptr<CBaseEntityWrapper>( \
86
87
(CBaseEntityWrapper *) from, \
87
- &NeverDeleteDeleter<CBaseEntityWrapper *>))); \
88
+ &NeverDeleteDeleter<CBaseEntityWrapper *>)); \
89
+ const char * str_value = extract<const char *>(str_from); \
88
90
BOOST_RAISE_EXCEPTION (PyExc_ValueError, XSTRINGIFY (Conversion from #from_name (%s) to #to_name failed.), str_value); \
89
91
} \
90
92
return result; \
You can’t perform that action at this time.
0 commit comments