about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/misc/resholve/0014-clang_incompatible_function_pointer_conversions.patch
blob: 52d5e6adfe74e8ee4e914580a915a8094250a755 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff -ur a/decoder.c b/decoder.c
--- a/decoder.c	1980-01-02 00:00:00.000000000 -0500
+++ b/decoder.c	2023-11-08 17:42:43.981838074 -0500
@@ -94,7 +94,7 @@
     return PlaceObject(ctx, PyBool_FromLong((long)(value)));
 }
 
-static int handle_number(void *ctx, const char *value, unsigned int length)
+static int handle_number(void *ctx, const char *value, size_t length)
 {
     //fprintf(stderr, "handle_number: ");
     //fwrite(value, length, 1, stderr);
@@ -127,7 +127,7 @@
     return status;
 }
 
-static int handle_string(void *ctx, const unsigned char *value, unsigned int length)
+static int handle_string(void *ctx, const unsigned char *value, size_t length)
 {
     return PlaceObject(ctx, PyString_FromStringAndSize((char *)value, length));
 }
@@ -142,7 +142,7 @@
     return success;
 }
 
-static int handle_dict_key(void *ctx, const unsigned char *value, unsigned int length)
+static int handle_dict_key(void *ctx, const unsigned char *value, size_t length)
 {
     PyObject *object = PyString_FromStringAndSize((const char *) value, length);
 
diff -ur a/yajl.c b/yajl.c
--- a/yajl.c	1980-01-02 00:00:00.000000000 -0500
+++ b/yajl.c	2023-11-08 17:41:18.781350335 -0500
@@ -161,7 +161,7 @@
 }
 
 static struct PyMethodDef yajl_methods[] = {
-    {"dumps", (PyCFunctionWithKeywords)(py_dumps), METH_VARARGS | METH_KEYWORDS,
+    {"dumps", (PyCFunction)(py_dumps), METH_VARARGS | METH_KEYWORDS,
 "yajl.dumps(obj [, indent=None])\n\n\
 Returns an encoded JSON string of the specified `obj`\n\
 \n\