Skip to content

Commit b41c95f

Browse files
committed
fix(Lib/ctypes): not compile if non-ffi
1 parent cfb2d16 commit b41c95f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎npython/builtinModules/ctypes/ffi/ffi/ffi_shim.nim‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ template withCStringArg(arg: PyObject, body: untyped): untyped =
1212
body
1313
else:
1414
return newTypeError newPyAscii"ctypes argument must be str or bytes for now"
15+
proc newPyCallback*(typ: PyTypeObject, callback: PyObject): PyObject {.raises: [].} =
16+
newNotImplementedError newPyAscii("ctypes callback not implemented due to " &
17+
"lack support of libffi for nim"
18+
)
1519

1620
implDynCall:
1721
if self.name == pyId"Py_Initialize":

0 commit comments

Comments
 (0)