diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-03 20:40:14 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-04 17:18:17 +0100 |
commit | 7dc4b7099a5474264eead0234d37db68f7fad215 (patch) | |
tree | 8e31622fc3998f070e641074f8fcbd56e9440fd1 /src/python/grpcio | |
parent | e018f9f2e8d1ed440032a2e4459135fb5fd093ea (diff) |
Dirty hack to get 32 bits loading in the cython core.
Diffstat (limited to 'src/python/grpcio')
-rw-r--r-- | src/python/grpcio/grpc/_cython/loader.c | 13 | ||||
-rw-r--r-- | src/python/grpcio/grpc/_cython/loader.h | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/python/grpcio/grpc/_cython/loader.c b/src/python/grpcio/grpc/_cython/loader.c index b56693dfb1..cdd47deed3 100644 --- a/src/python/grpcio/grpc/_cython/loader.c +++ b/src/python/grpcio/grpc/_cython/loader.c @@ -35,8 +35,15 @@ #if GPR_WIN32 -int pygrpc_load_core(const char *path) { - HMODULE grpc_c = LoadLibraryA(path); +int pygrpc_load_core(char *path) { + HMODULE grpc_c; +#ifdef GPR_ARCH_32 + /* Close your eyes for a moment, it'll all be over soon. */ + char *six = strrchr(path, '6'); + *six++ = '3'; + *six = '2'; +#endif + grpc_c = LoadLibraryA(path); if (grpc_c) { pygrpc_load_imports(grpc_c); return 1; @@ -47,6 +54,6 @@ int pygrpc_load_core(const char *path) { #else -int pygrpc_load_core(const char *path) { return 1; } +int pygrpc_load_core(char *path) { return 1; } #endif diff --git a/src/python/grpcio/grpc/_cython/loader.h b/src/python/grpcio/grpc/_cython/loader.h index c41ba2184d..dd31e1561b 100644 --- a/src/python/grpcio/grpc/_cython/loader.h +++ b/src/python/grpcio/grpc/_cython/loader.h @@ -40,6 +40,6 @@ #include <grpc/byte_buffer_reader.h> /* Attempts to load the core if necessary, and return non-zero upon succes. */ -int pygrpc_load_core(const char *path); +int pygrpc_load_core(char *path); #endif /* GRPC_RB_BYTE_BUFFER_H_ */ |