| 1 |
#------------------------------------------------------------------------- |
| 2 |
# Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 |
# Licensed under the MIT License. See License.txt in the project root for |
| 4 |
# license information. |
| 5 |
#-------------------------------------------------------------------------- |
| 6 |
|
| 7 |
cdef extern from "azure_c_shared_utility/xlogging.h": |
| 8 |
|
| 9 |
cdef enum LOG_CATEGORY_TAG: |
| 10 |
AZ_LOG_ERROR, |
| 11 |
AZ_LOG_INFO, |
| 12 |
AZ_LOG_TRACE |
| 13 |
|
| 14 |
ctypedef void(*LOGGER_LOG)(LOG_CATEGORY_TAG log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...) |
| 15 |
|
| 16 |
void xlogging_set_log_function(LOGGER_LOG log_function) |
| 17 |
|
| 18 |
|
| 19 |
cdef extern from "stdarg.h": |
| 20 |
|
| 21 |
ctypedef struct va_list: |
| 22 |
pass |
| 23 |
|
| 24 |
ctypedef struct fake_type: |
| 25 |
pass |
| 26 |
|
| 27 |
void va_copy(va_list dest, va_list src) |
| 28 |
void va_start(va_list, void* arg) |
| 29 |
void* va_arg(va_list, fake_type) |
| 30 |
void va_end(va_list) |
| 31 |
fake_type char_type "const char*" |
| 32 |
|
| 33 |
|
| 34 |
cdef extern from "va_copy_patch.h": |
| 35 |
void va_copy(va_list dest, va_list src) |
| 36 |
|
| 37 |
|
| 38 |
cdef extern from "stdio.h": |
| 39 |
|
| 40 |
int vsnprintf(char* s, size_t n, const char* format, va_list arg) |
| 41 |
int vprintf(const char *format, va_list arg) |