Skip to content

Commit

Permalink
add missing annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Nov 13, 2024
1 parent de92b7d commit ccab2de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
17 changes: 15 additions & 2 deletions parser/llguidance.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

typedef struct LlgConstraint LlgConstraint;

typedef struct LlgConstraintStep LlgConstraintStep;

typedef struct LlgTokenizer LlgTokenizer;

typedef struct LlgParserLimits {
Expand Down Expand Up @@ -110,6 +108,21 @@ typedef struct LlgCommitResult {
bool is_stop;
} LlgCommitResult;

typedef struct LlgConstraintStep {
/**
* The constraint to compute mask for.
*/
struct LlgConstraint *constraint;
/**
* Pointer to memory where the mask should be written.
*/
uint32_t *mask_dest;
/**
* The length of the mask_dest array in bytes (not elements).
*/
size_t mask_byte_len;
} LlgConstraintStep;

/**
* Function which llg calls when an operation is done.
*/
Expand Down
1 change: 1 addition & 0 deletions parser/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ pub struct LlgConstraintInit {
}

#[derive(Clone)]
#[repr(C)]
pub struct LlgConstraintStep {
/// The constraint to compute mask for.
pub constraint: *mut LlgConstraint,
Expand Down

0 comments on commit ccab2de

Please sign in to comment.