Skip to content

Commit 30e19b0

Browse files
Jonathan D.A. Jewellclaude
andcommitted
fix(ffi): correct field names in FFI functions
- formatrix_block_count: use doc.content instead of doc.blocks - formatrix_get_format: use doc.source_format instead of doc.meta.source_format - Mark FD-M10 (C FFI exports) as done in requirements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d27efe5 commit 30e19b0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

crates/formatrix-core/src/ffi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ pub unsafe extern "C" fn formatrix_block_count(handle: *const DocumentHandle) ->
278278
if handle.is_null() {
279279
return 0;
280280
}
281-
(*handle).doc.blocks.len()
281+
(*handle).doc.content.len()
282282
}
283283

284284
/// Get the source format of a document
@@ -290,7 +290,7 @@ pub unsafe extern "C" fn formatrix_get_format(handle: *const DocumentHandle) ->
290290
if handle.is_null() {
291291
return FfiFormat::PlainText;
292292
}
293-
(*handle).doc.meta.source_format.into()
293+
(*handle).doc.source_format.into()
294294
}
295295

296296
/// Free a document handle

docs/MOSCOW-REQUIREMENTS.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This document defines Must/Should/Could requirements for each component of the d
5555

5656
|FD-M10
5757
|C FFI exports for Ada TUI
58-
|🔲 Pending
58+
|✅ Done
5959

6060
|FD-M11
6161
|Basic Ada TUI with ncurses

0 commit comments

Comments
 (0)