aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/src
diff options
context:
space:
mode:
authorGravatar kpayson64 <kpayson@google.com>2016-07-08 16:02:49 -0700
committerGravatar GitHub <noreply@github.com>2016-07-08 16:02:49 -0700
commit8444f2f9aaee5bf4a596fc8fbbcb369868e593c0 (patch)
treef9d1c8cca694eaa3d2a49fc81bf5a6884d4022d8 /templates/src
parentacb0207b63ddcdf45ea75c52f82dbd5423a6069f (diff)
parent3a9e6d9770c3c8fb86135a6afea4ef3514996a10 (diff)
Merge pull request #7195 from soltanmm/winfix
Fix Python interop unit-tests on Windows
Diffstat (limited to 'templates/src')
-rw-r--r--templates/src/python/grpcio/grpc/_cython/imports.generated.c.template22
-rw-r--r--templates/src/python/grpcio/grpc/_cython/imports.generated.h.template29
2 files changed, 2 insertions, 49 deletions
diff --git a/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template b/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template
index 84fa5e62bf..d83bccad1d 100644
--- a/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template
+++ b/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template
@@ -33,29 +33,9 @@
*
*/
+ /* TODO(atash) remove cruft */
#include <grpc/support/port_platform.h>
#include "imports.generated.h"
- #ifdef GPR_WINDOWS
-
- %for api in c_apis:
- ${api.name}_type ${api.name}_import;
- %endfor
-
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cpluslus */
-
- void pygrpc_load_imports(HMODULE library) {
- %for api in c_apis:
- ${api.name}_import = (${api.name}_type) GetProcAddress(library, "${api.name}");
- %endfor
- }
-
- #ifdef __cplusplus
- }
- #endif /* __cpluslus */
-
- #endif /* !GPR_WINDOWS */
diff --git a/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template b/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template
index d0f60dc0a5..b85bc3dbd8 100644
--- a/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template
+++ b/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template
@@ -33,37 +33,12 @@
*
*/
+ /* TODO(atash) remove cruft */
#ifndef PYGRPC_CYTHON_WINDOWS_IMPORTS_H_
#define PYGRPC_CYTHON_WINDOWS_IMPORTS_H_
#include <grpc/support/port_platform.h>
- #ifdef GPR_WINDOWS
-
- #include <windows.h>
-
- %for header in sorted(set(api.header for api in c_apis)):
- #include <${'/'.join(header.split('/')[1:])}>
- %endfor
-
- %for api in c_apis:
- typedef ${api.return_type}(*${api.name}_type)(${api.arguments});
- extern ${api.name}_type ${api.name}_import;
- #define ${api.name} ${api.name}_import
- %endfor
-
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cpluslus */
-
- void pygrpc_load_imports(HMODULE library);
-
- #ifdef __cplusplus
- }
- #endif /* __cpluslus */
-
- #else /* !GPR_WINDOWS */
-
#include <grpc/byte_buffer.h>
#include <grpc/byte_buffer_reader.h>
#include <grpc/compression.h>
@@ -74,6 +49,4 @@
#include <grpc/support/time.h>
#include <grpc/status.h>
- #endif /* !GPR_WINDOWS */
-
#endif