File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,15 @@ void CallHelperVoid(DCCallVM* vm, unsigned long addr)
259259 EXCEPT_SEGV ()
260260}
261261
262+ bool CallHelperBool (DCCallVM* vm, unsigned long addr)
263+ {
264+ bool result;
265+ TRY_SEGV ()
266+ result = dcCallBool (vm, addr) & 1 ;
267+ EXCEPT_SEGV ()
268+ return result;
269+ }
270+
262271object CFunction::Call (tuple args, dict kw)
263272{
264273 if (!IsCallable ())
@@ -309,7 +318,7 @@ object CFunction::Call(tuple args, dict kw)
309318 switch (m_eReturnType)
310319 {
311320 case DATA_TYPE_VOID: CallHelperVoid (g_pCallVM, m_ulAddr); break ;
312- case DATA_TYPE_BOOL: return object (CallHelper< bool >(dcCallBool, g_pCallVM, m_ulAddr));
321+ case DATA_TYPE_BOOL: return object (CallHelperBool ( g_pCallVM, m_ulAddr));
313322 case DATA_TYPE_CHAR: return object (CallHelper<char >(dcCallChar, g_pCallVM, m_ulAddr));
314323 case DATA_TYPE_UCHAR: return object (CallHelper<unsigned char >(dcCallChar, g_pCallVM, m_ulAddr));
315324 case DATA_TYPE_SHORT: return object (CallHelper<short >(dcCallShort, g_pCallVM, m_ulAddr));
You can’t perform that action at this time.
0 commit comments