File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,31 @@ def get_sources():
22
22
return sorted (glob .glob ("src/*.c" ) + ["vendor/hiredis/%s.c" % src for src in hiredis_sources ])
23
23
24
24
25
+ def get_linker_args ():
26
+ if 'win32' in sys .platform or 'darwin' in sys .platform :
27
+ return []
28
+ else :
29
+ return ["-Wl,-Bsymbolic" , ]
30
+
31
+
25
32
def get_compiler_args ():
26
33
if 'win32' in sys .platform :
27
34
return []
28
35
else :
29
- return ["-std=c99" , "-static-libstdc++" , "-O2" ]
36
+ return ["-std=c99" ]
30
37
31
38
32
39
def get_libraries ():
33
40
if 'win32' in sys .platform :
34
- return ["ws2_32" ,]
41
+ return ["ws2_32" , ]
35
42
else :
36
43
return []
37
44
38
45
39
46
ext = Extension ("hiredis.hiredis" ,
40
47
sources = get_sources (),
41
48
extra_compile_args = get_compiler_args (),
49
+ extra_link_args = get_linker_args (),
42
50
libraries = get_libraries (),
43
51
include_dirs = ["vendor" ])
44
52
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ pack_command(PyObject *cmd)
37
37
{
38
38
return PyErr_NoMemory ();
39
39
}
40
-
40
+
41
41
memset (tokens , 0 , sizeof (sds ) * tokens_number );
42
42
43
43
size_t * lengths = hi_malloc (sizeof (size_t ) * tokens_number );
You can’t perform that action at this time.
0 commit comments