| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3067,7 +3067,7 @@ static PyGetSetDef PyCFuncPtr_getsets[] = { | |||
| 3067 | 3067 | }; | |
| 3068 | 3068 | ||
| 3069 | 3069 | #ifdef MS_WIN32 | |
| 3070 | - static PPROC FindAddress(void *handle, char *name, PyObject *type) | ||
| 3070 | + static PPROC FindAddress(void *handle, const char *name, PyObject *type) | ||
| 3071 | 3071 | { | |
| 3072 | 3072 | #ifdef MS_WIN64 | |
| 3073 | 3073 | /* win64 has no stdcall calling conv, so it should | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,10 +48,6 @@ | |||
| 48 | 48 | #undef strtoll | |
| 49 | 49 | #define strtoll _strtoi64 | |
| 50 | 50 | #define strdup _strdup | |
| 51 | - #define PRIi64 "I64i" | ||
| 52 | - #define PRIu64 "I64u" | ||
| 53 | - #define PRIi32 "I32i" | ||
| 54 | - #define PRIu32 "I32u" | ||
| 55 | 51 | #endif | |
| 56 | 52 | ||
| 57 | 53 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,7 @@ | |||
| 4 | 4 | #define PY_SSIZE_T_CLEAN | |
| 5 | 5 | ||
| 6 | 6 | #include "Python.h" | |
| 7 | + #include <inttypes.h> | ||
| 7 | 8 | ||
| 8 | 9 | typedef short PyInt16; | |
| 9 | 10 | ||
@@ -448,7 +449,7 @@ audioop_max_impl(PyObject *module, Py_buffer *fragment, int width) | |||
| 448 | 449 | int val = GETRAWSAMPLE(width, fragment->buf, i); | |
| 449 | 450 | /* Cast to unsigned before negating. Unsigned overflow is well- | |
| 450 | 451 | defined, but signed overflow is not. */ | |
| 451 | - if (val < 0) absval = -(unsigned int)val; | ||
| 452 | + if (val < 0) absval = (unsigned int)-(int64_t)val; | ||
| 452 | 453 | else absval = val; | |
| 453 | 454 | if (absval > max) max = absval; | |
| 454 | 455 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,7 +58,7 @@ main(int argc, char *argv[]) | |||
| 58 | 58 | fprintf(stderr, "cannot fstat '%s'\n", inpath); | |
| 59 | 59 | goto error; | |
| 60 | 60 | } | |
| 61 | - text_size = status.st_size; | ||
| 61 | + text_size = (size_t)status.st_size; | ||
| 62 | 62 | text = (char *) malloc(text_size + 1); | |
| 63 | 63 | if (text == NULL) { | |
| 64 | 64 | fprintf(stderr, "could not allocate %ld bytes\n", (long) text_size); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments