Skip to content

Commit 4d31631

Browse files
committed
Account for size_t
1 parent abd9c7c commit 4d31631

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/generate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def translate_type_base(cty):
112112
return 'c32'
113113
elif 'lapack_complex_double' in cty:
114114
return 'c64'
115+
elif 'size_t' in cty:
116+
return 'libc::c_ulong'
115117

116118
assert False, 'cannot translate `{}`'.format(cty)
117119

@@ -152,6 +154,9 @@ def translate_body_argument(name, rty):
152154
elif rty.startswith('&mut [c'):
153155
return '{}.as_mut_ptr() as *mut _'.format(name)
154156

157+
elif rty.startswith('libc::'):
158+
return '&{}'.format(name)
159+
155160
assert False, 'cannot translate `{}: {}`'.format(name, rty)
156161

157162

0 commit comments

Comments
 (0)