Skip to content

Commit

Permalink
Reverting gcc -BSymbolic due to symbol collisions (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
zalmane authored Feb 12, 2023
1 parent 73b8c9d commit a5574a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,31 @@ def get_sources():
return sorted(glob.glob("src/*.c") + ["vendor/hiredis/%s.c" % src for src in hiredis_sources])


def get_linker_args():
if 'win32' in sys.platform or 'darwin' in sys.platform:
return []
else:
return ["-Wl,-Bsymbolic", ]


def get_compiler_args():
if 'win32' in sys.platform:
return []
else:
return ["-std=c99", "-static-libstdc++", "-O2"]
return ["-std=c99"]


def get_libraries():
if 'win32' in sys.platform:
return ["ws2_32",]
return ["ws2_32", ]
else:
return []


ext = Extension("hiredis.hiredis",
sources=get_sources(),
extra_compile_args=get_compiler_args(),
extra_link_args=get_linker_args(),
libraries=get_libraries(),
include_dirs=["vendor"])

Expand Down
2 changes: 1 addition & 1 deletion src/pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pack_command(PyObject *cmd)
{
return PyErr_NoMemory();
}

memset(tokens, 0, sizeof(sds) * tokens_number);

size_t *lengths = hi_malloc(sizeof(size_t) * tokens_number);
Expand Down

0 comments on commit a5574a9

Please sign in to comment.