Skip to content

Commit a5574a9

Browse files
authored
Reverting gcc -BSymbolic due to symbol collisions (#156)
1 parent 73b8c9d commit a5574a9

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

setup.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,31 @@ def get_sources():
2222
return sorted(glob.glob("src/*.c") + ["vendor/hiredis/%s.c" % src for src in hiredis_sources])
2323

2424

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+
2532
def get_compiler_args():
2633
if 'win32' in sys.platform:
2734
return []
2835
else:
29-
return ["-std=c99", "-static-libstdc++", "-O2"]
36+
return ["-std=c99"]
3037

3138

3239
def get_libraries():
3340
if 'win32' in sys.platform:
34-
return ["ws2_32",]
41+
return ["ws2_32", ]
3542
else:
3643
return []
3744

3845

3946
ext = Extension("hiredis.hiredis",
4047
sources=get_sources(),
4148
extra_compile_args=get_compiler_args(),
49+
extra_link_args=get_linker_args(),
4250
libraries=get_libraries(),
4351
include_dirs=["vendor"])
4452

src/pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pack_command(PyObject *cmd)
3737
{
3838
return PyErr_NoMemory();
3939
}
40-
40+
4141
memset(tokens, 0, sizeof(sds) * tokens_number);
4242

4343
size_t *lengths = hi_malloc(sizeof(size_t) * tokens_number);

0 commit comments

Comments
 (0)