Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8e122b8
Implemented pack_bytes and pack_command.
prokazov-redis Jan 12, 2023
be55776
Bump version + make it work in a clean environment
prokazov-redis Jan 14, 2023
2d45fb1
pack_command that passes redis-py test (*almost*)
prokazov-redis Jan 16, 2023
fdb1314
Removed pack-bytes and added some tests.
prokazov-redis Jan 18, 2023
96e5d8e
Removed pack-bytes and added some tests.
prokazov-redis Jan 18, 2023
143a81c
Merge branch 'pack_command'
prokazov-redis Jan 18, 2023
ff5ccaa
even more clean up.
prokazov-redis Jan 18, 2023
83edbe8
Re-factored tests and added a couple more ones.
prokazov Jan 19, 2023
b54372d
1) Fix the compiler warning in pack.c
prokazov Jan 19, 2023
a5f8a3b
1) Fixed typo.
prokazov-redis Jan 23, 2023
241000c
1) Fixed typo.
prokazov-redis Jan 23, 2023
4a416d7
Autopep-8 on setup.py
prokazov-redis Jan 23, 2023
5807460
Drop extra link args
prokazov Jan 25, 2023
8643b7c
add conditional compile flags excluding windows and mac
zalmane Jan 25, 2023
3517354
Remove egg-info
prokazov Jan 25, 2023
05fe090
1) add conditional compile flags excluding windows and mac
prokazov-redis Jan 25, 2023
2ffa362
Actually use conditional compile flags
prokazov Jan 25, 2023
1758fe9
Fix the Windows build.
prokazov-redis Jan 26, 2023
11fa235
Re-factored setup.py and actually fixed the Windows build.
prokazov-redis Jan 26, 2023
d1a5ebe
Apparently 'win' is not the same as win32.
prokazov-redis Jan 26, 2023
493d6a7
Merge branch 'master' into master
chayim Jan 30, 2023
1f1af09
1) Don't use Bsymbolic linker arg
prokazov Jan 31, 2023
2905028
revert back to using Bsymbolic
zalmane Feb 9, 2023
bd654f9
Merge branch 'master' of https://github.com/redis/hiredis-py
zalmane Feb 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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