Skip to content

Commit 8a203f9

Browse files
committed
llama : fix compile warnings in llama_set_state_data()
1 parent 4fd3e29 commit 8a203f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llama.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2618,8 +2618,8 @@ size_t llama_copy_state_data(struct llama_context * ctx, uint8_t * dst) {
26182618
}
26192619

26202620
// Sets the state reading from the specified source address
2621-
size_t llama_set_state_data(struct llama_context * ctx, const uint8_t * src) {
2622-
const uint8_t * inp = src;
2621+
size_t llama_set_state_data(struct llama_context * ctx, uint8_t * src) {
2622+
uint8_t * inp = src;
26232623

26242624
// set rng
26252625
{

llama.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ extern "C" {
138138

139139
// Set the state reading from the specified address
140140
// Returns the number of bytes read
141-
LLAMA_API size_t llama_set_state_data(struct llama_context * ctx, const uint8_t * src);
141+
LLAMA_API size_t llama_set_state_data(struct llama_context * ctx, uint8_t * src);
142142

143143
// Save/load session file
144144
LLAMA_API bool llama_load_session_file(struct llama_context * ctx, const char * path_session, llama_token * tokens_out, size_t n_token_capacity, size_t * n_token_count_out);

0 commit comments

Comments
 (0)