@@ -275,8 +275,8 @@ def mtmd_bitmap_get_data(bitmap: mtmd_bitmap_p) -> c_char_p:
275275 ...
276276
277277# MTMD_API size_t mtmd_bitmap_get_n_bytes(const mtmd_bitmap * bitmap);
278- @ctypes_function_mtmd ("mtmd_bitmap_get_n_bytes" , [mtmd_bitmap_p_ctypes ], c_uint )
279- def mtmd_bitmap_get_n_bytes (bitmap : mtmd_bitmap_p ) -> c_uint :
278+ @ctypes_function_mtmd ("mtmd_bitmap_get_n_bytes" , [mtmd_bitmap_p_ctypes ], c_size_t )
279+ def mtmd_bitmap_get_n_bytes (bitmap : mtmd_bitmap_p ) -> c_size_t :
280280 ...
281281
282282# MTMD_API bool mtmd_bitmap_is_audio (const mtmd_bitmap * bitmap);
@@ -330,8 +330,8 @@ def mtmd_input_chunks_init() -> mtmd_input_chunks_p:
330330
331331
332332# MTMD_API size_t mtmd_input_chunks_size(const mtmd_input_chunks * chunks);
333- @ctypes_function_mtmd ("mtmd_input_chunks_size" , [mtmd_input_chunks_p_ctypes ], c_uint )
334- def mtmd_input_chunks_size (chunks : mtmd_input_chunks_p ) -> c_uint :
333+ @ctypes_function_mtmd ("mtmd_input_chunks_size" , [mtmd_input_chunks_p_ctypes ], c_size_t )
334+ def mtmd_input_chunks_size (chunks : mtmd_input_chunks_p ) -> c_size_t :
335335 ...
336336
337337
@@ -385,8 +385,8 @@ def mtmd_input_chunk_get_tokens_image(chunk: mtmd_input_chunk_p) -> mtmd_image_t
385385 ...
386386
387387# MTMD_API size_t mtmd_input_chunk_get_n_tokens (const mtmd_input_chunk * chunk);
388- @ctypes_function_mtmd ("mtmd_input_chunk_get_n_tokens" , [mtmd_input_chunk_p_ctypes ], c_uint )
389- def mtmd_input_chunk_get_n_tokens (chunk : mtmd_input_chunk_p ) -> c_uint :
388+ @ctypes_function_mtmd ("mtmd_input_chunk_get_n_tokens" , [mtmd_input_chunk_p_ctypes ], c_size_t )
389+ def mtmd_input_chunk_get_n_tokens (chunk : mtmd_input_chunk_p ) -> c_size_t :
390390 ...
391391
392392# // returns nullptr for ID on text chunk
@@ -435,20 +435,20 @@ def mtmd_input_chunk_free(chunk: mtmd_input_chunk_p):
435435# // it will be freed along with mtmd_input_chunk
436436# MTMD_API size_t mtmd_image_tokens_get_n_tokens(const mtmd_image_tokens * image_tokens); // TODO: deprecate
437437@ctypes_function_mtmd (
438- "mtmd_image_tokens_get_n_tokens" , [mtmd_image_tokens_p_ctypes ], c_uint )
439- def mtmd_image_tokens_get_n_tokens (image_tokens : mtmd_image_tokens_p ) -> c_uint :
438+ "mtmd_image_tokens_get_n_tokens" , [mtmd_image_tokens_p_ctypes ], c_size_t )
439+ def mtmd_image_tokens_get_n_tokens (image_tokens : mtmd_image_tokens_p ) -> c_size_t :
440440 ...
441441
442442# MTMD_API size_t mtmd_image_tokens_get_nx (const mtmd_image_tokens * image_tokens);
443443@ctypes_function_mtmd (
444- "mtmd_image_tokens_get_nx" , [mtmd_image_tokens_p_ctypes ], c_uint )
445- def mtmd_image_tokens_get_nx (image_tokens : mtmd_image_tokens_p ) -> c_uint :
444+ "mtmd_image_tokens_get_nx" , [mtmd_image_tokens_p_ctypes ], c_size_t )
445+ def mtmd_image_tokens_get_nx (image_tokens : mtmd_image_tokens_p ) -> c_size_t :
446446 ...
447447
448448# MTMD_API size_t mtmd_image_tokens_get_ny (const mtmd_image_tokens * image_tokens);
449449@ctypes_function_mtmd (
450- "mtmd_image_tokens_get_ny" , [mtmd_image_tokens_p_ctypes ], c_uint )
451- def mtmd_image_tokens_get_ny (image_tokens : mtmd_image_tokens_p ) -> c_uint :
450+ "mtmd_image_tokens_get_ny" , [mtmd_image_tokens_p_ctypes ], c_size_t )
451+ def mtmd_image_tokens_get_ny (image_tokens : mtmd_image_tokens_p ) -> c_size_t :
452452 ...
453453
454454# MTMD_API const char * mtmd_image_tokens_get_id (const mtmd_image_tokens * image_tokens); // TODO: deprecate
@@ -630,8 +630,8 @@ def mtmd_helper_bitmap_init_from_buf(
630630# // helper to count the total number of tokens from a list of chunks, useful to keep track of KV cache
631631# MTMD_API size_t mtmd_helper_get_n_tokens(const mtmd_input_chunks * chunks);
632632@ctypes_function_mtmd (
633- "mtmd_helper_get_n_tokens" , [mtmd_input_chunk_p_ctypes ], c_uint )
634- def mtmd_helper_get_n_tokens (chunks : mtmd_input_chunk_p ) -> c_uint :
633+ "mtmd_helper_get_n_tokens" , [mtmd_input_chunk_p_ctypes ], c_size_t )
634+ def mtmd_helper_get_n_tokens (chunks : mtmd_input_chunk_p ) -> c_size_t :
635635 """
636636 helper to count the total number of tokens from a list of chunks, useful to keep track of KV cache
637637 """
0 commit comments