Skip to content

Commit b411da9

Browse files
committed
fix numthreads parsing, expect int value
Not ideal though (int to str in cython and back to int on the C++ side) Ref: #5
1 parent 0dea00c commit b411da9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frog_wrapper.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ cdef class FrogOptions:
127127
else:
128128
self.capi.insert(<string>b"id", <string>value.encode('utf-8'))
129129
elif key.lower() in ('numthreads','threads'):
130-
self.capi.insert(<string>b"threads",<string>value)
130+
if isinstance(value, int):
131+
self.capi.insert(<string>b"threads",str(value).encode('utf-8'))
132+
else:
133+
self.capi.insert(<string>b"threads",<string>value)
131134
else:
132135
if key == 'x':
133136
self.shadow['xmlin'] = True

0 commit comments

Comments
 (0)