We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74114e9 commit f3dc2f7Copy full SHA for f3dc2f7
2 files changed
src/stack.h
@@ -19,7 +19,7 @@ STACK_CLASS(StackClass)
19
20
static inline StackClass*
21
FNAME(alloc)(size_t sz) {
22
- StackClass *ans = calloc(sizeof(StackClass), 1);
+ StackClass *ans = calloc(1, sizeof(StackClass));
23
if (ans) {
24
ans->items = (StackItemClass*)malloc(sizeof(StackItemClass) * sz);
25
if (ans->items) ans->capacity = sz;
test.c
@@ -7,13 +7,13 @@
7
8
#include <Python.h>
9
10
-int
+int
11
main(int argc, char **argv) {
12
#if PY_MAJOR_VERSION >= 3
13
wchar_t *argw[1024] = {0};
14
int i;
15
for (i = 0; i < argc; i++) {
16
- argw[i] = (wchar_t*)calloc(sizeof(wchar_t), 1024);
+ argw[i] = (wchar_t*)calloc(1024, sizeof(wchar_t));
17
swprintf(argw[i], 1024, L"%hs", argv[i]);
18
}
return Py_Main(argc, argw);
0 commit comments