8000 fix: llama_log_set should be able to accept null pointer · devilcoder01/llama-cpp-python@c970d41 · GitHub
[go: up one dir, main page]

Skip to content

Commit c970d41

Browse files
committed
fix: llama_log_set should be able to accept null pointer
1 parent 9677a1f commit c970d41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama_cpp/llama_cpp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,15 +2528,15 @@ def llama_print_system_info() -> bytes:
25282528
# // If this is not called, or NULL is supplied, everything is output on stderr.
25292529
# LLAMA_API void llama_log_set(ggml_log_callback log_callback, void * user_data);
25302530
def llama_log_set(
2531-
log_callback: "ctypes._FuncPointer", user_data: c_void_p # type: ignore
2531+
log_callback: Union["ctypes._FuncPointer", c_void_p], user_data: c_void_p # type: ignore
25322532
):
25332533
"""Set callback for all future logging events.
25342534
25352535
If this is not called, or NULL is supplied, everything is output on stderr."""
25362536
return _lib.llama_log_set(log_callback, user_data)
25372537

25382538

2539-
_lib.llama_log_set.argtypes = [llama_log_callback, c_void_p]
2539+
_lib.llama_log_set.argtypes = [ctypes.c_void_p, c_void_p]
25402540
_lib.llama_log_set.restype = None
25412541

25422542

0 commit comments

Comments
 (0)
0