diff --git a/ffi/codegen/c.nim b/ffi/codegen/c.nim index eb8b73c..4e8fcc0 100644 --- a/ffi/codegen/c.nim +++ b/ffi/codegen/c.nim @@ -433,7 +433,9 @@ proc emitReplyTrampolineHead(lines: var seq[string], tramp, boxType, fallback: s "static void " & tramp & "(int ret, const char* msg, size_t len, void* ud) {" ) lines.add(" " & boxType & "* box = (" & boxType & "*)ud;") - lines.add(" /* Non-terminal progress ping: keep the box for the terminal reply. */") + lines.add( + " /* Non-terminal progress ping: keep the box for the terminal reply. */" + ) lines.add(" if (ret == NIMFFI_RET_STALE_WARN) return;") lines.add(" if (!box->fn) {") lines.add(" free(box);") diff --git a/ffi/codegen/c_abi.nim b/ffi/codegen/c_abi.nim index bdec88b..1582891 100644 --- a/ffi/codegen/c_abi.nim +++ b/ffi/codegen/c_abi.nim @@ -271,7 +271,9 @@ proc emitCtxAndCtor( ) lines.add(" " & createBox & "* box = (" & createBox & "*)ud;") lines.add(" if (!box) return;") - lines.add(" /* Non-terminal progress ping: keep the box for the terminal reply. */") + lines.add( + " /* Non-terminal progress ping: keep the box for the terminal reply. */" + ) lines.add(" if (ret == NIMFFI_RET_STALE_WARN) return;") lines.add(" if (!box->fn) { free(box); return; }") lines.add(" if (ret != 0) {") @@ -404,9 +406,7 @@ proc generateCAbiLibHeader*( lines.add("#define NIMFFI_RET_OK 0") lines.add("#define NIMFFI_RET_ERR 1") lines.add("#define NIMFFI_RET_MISSING_CALLBACK 2") - lines.add( - "/* Non-terminal: the request is still running. Fires every ~5s with `msg`" - ) + lines.add("/* Non-terminal: the request is still running. Fires every ~5s with `msg`") lines.add( " carrying the elapsed milliseconds as decimal text; always followed by a" ) diff --git a/ffi/internal/ffi_macro.nim b/ffi/internal/ffi_macro.nim index 1cea656..420cd59 100644 --- a/ffi/internal/ffi_macro.nim +++ b/ffi/internal/ffi_macro.nim @@ -68,8 +68,7 @@ proc resolveFFISpecs(specs: seq[NimNode]): ABIFormat {.compileTime.} = for override in specs: if override.kind notin {nnkStrLit, nnkRStrLit, nnkTripleStrLit}: error( - "FFI override must be a string literal like \"abi = c\", got: " & - override.repr + "FFI override must be a string literal like \"abi = c\", got: " & override.repr ) case overrideKey($override) of "abi": @@ -1519,9 +1518,7 @@ macro ffiCtor*(args: varargs[untyped]): untyped = # The flat-struct exported wrapper is emitted at genBindings() time (see # flushCAbiDispatch); the CBOR `ffiProc` is not. registerCAbiCtor(cExportName, libTypeName, reqTypeName, paramNames, paramTypes) - newStmtList( - typeDef, ffiNewReqProc, helperProc, processProc, addToReg, poolDecl - ) + newStmtList(typeDef, ffiNewReqProc, helperProc, processProc, addToReg, poolDecl) else: newStmtList( typeDef, ffiNewReqProc, helperProc, processProc, addToReg, poolDecl, ffiProc