Merge github.com:grpc/grpc into delete-the-old-api

Conflicts:
	vsprojects/Grpc.mak
pull/1397/head
Craig Tiller 10 years ago
commit 76eabbd3af
  1. 12
      src/core/support/cpu_windows.c
  2. 4
      src/core/surface/call.c
  3. 10
      src/csharp/ext/grpc_csharp_ext.c
  4. 2
      src/python/src/grpc/_adapter/_call.h
  5. 2
      src/python/src/grpc/_adapter/_channel.h
  6. 2
      src/python/src/grpc/_adapter/_client_credentials.h
  7. 4
      src/python/src/grpc/_adapter/_completion_queue.c
  8. 2
      src/python/src/grpc/_adapter/_completion_queue.h
  9. 2
      src/python/src/grpc/_adapter/_server_credentials.h
  10. 2
      src/python/src/grpc/_adapter/_tag.h
  11. 2
      src/python/src/setup.py
  12. 4
      templates/vsprojects/Grpc.mak.template
  13. 3
      test/core/fling/server.c
  14. 788
      vsprojects/Grpc.mak

@ -34,19 +34,17 @@
#include <grpc/support/port_platform.h>
#ifdef GPR_WIN32
#include <windows.h>
#include <grpc/support/log.h>
unsigned gpr_cpu_num_cores(void) {
/* TODO(jtattermusch): implement */
gpr_log(GPR_ERROR, "Cannot determine number of CPUs: assuming 1");
return 1;
SYSTEM_INFO si;
GetSystemInfo(&si);
return si.dwNumberOfProcessors;
}
unsigned gpr_cpu_current_cpu(void) {
/* TODO(jtattermusch): implement */
gpr_log(GPR_ERROR, "Cannot determine current CPU");
return 0;
return GetCurrentProcessorNumber();
}
#endif /* GPR_WIN32 */

@ -711,6 +711,10 @@ static void call_on_done_recv(void *pc, int success) {
if (call->recv_state == GRPC_STREAM_CLOSED) {
GPR_ASSERT(call->read_state <= READ_STATE_STREAM_CLOSED);
call->read_state = READ_STATE_STREAM_CLOSED;
if (call->have_alarm) {
grpc_alarm_cancel(&call->alarm);
call->have_alarm = 0;
}
}
finish_read_ops(call);
} else {

@ -415,16 +415,6 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_call_destroy(grpc_call *call) {
grpc_call_destroy(call);
}
GPR_EXPORT void GPR_CALLTYPE
grpcsharp_call_start_write_from_copied_buffer(grpc_call *call,
const char *buffer, size_t len,
void *tag, gpr_uint32 flags) {
grpc_byte_buffer *byte_buffer = string_to_byte_buffer(buffer, len);
GPR_ASSERT(grpc_call_start_write_old(call, byte_buffer, tag, flags) ==
GRPC_CALL_OK);
grpc_byte_buffer_destroy(byte_buffer);
}
GPR_EXPORT grpc_call_error GPR_CALLTYPE
grpcsharp_call_start_unary(grpc_call *call, callback_funcptr callback,
const char *send_buffer, size_t send_buffer_len,

@ -70,7 +70,7 @@ typedef struct {
grpc_call *c_call;
} Call;
PyTypeObject pygrpc_CallType;
extern PyTypeObject pygrpc_CallType;
int pygrpc_add_call(PyObject *module);

@ -42,7 +42,7 @@ typedef struct {
grpc_channel *c_channel;
} Channel;
PyTypeObject pygrpc_ChannelType;
extern PyTypeObject pygrpc_ChannelType;
int pygrpc_add_channel(PyObject *module);

@ -42,7 +42,7 @@ typedef struct {
grpc_credentials *c_client_credentials;
} ClientCredentials;
PyTypeObject pygrpc_ClientCredentialsType;
extern PyTypeObject pygrpc_ClientCredentialsType;
int pygrpc_add_client_credentials(PyObject *module);

@ -354,6 +354,8 @@ static PyObject *pygrpc_completion_queue_get(CompletionQueue *self,
PyObject *event_args;
PyObject *event;
pygrpc_tag *tag;
if (!(PyArg_ParseTuple(args, "O:get", &deadline))) {
return NULL;
}
@ -380,7 +382,7 @@ static PyObject *pygrpc_completion_queue_get(CompletionQueue *self,
Py_RETURN_NONE;
}
pygrpc_tag *tag = (pygrpc_tag *)c_event->tag;
tag = (pygrpc_tag *)c_event->tag;
switch (c_event->type) {
case GRPC_QUEUE_SHUTDOWN:

@ -42,7 +42,7 @@ typedef struct {
grpc_completion_queue *c_completion_queue;
} CompletionQueue;
PyTypeObject pygrpc_CompletionQueueType;
extern PyTypeObject pygrpc_CompletionQueueType;
int pygrpc_add_completion_queue(PyObject *module);

@ -42,7 +42,7 @@ typedef struct {
grpc_server_credentials *c_server_credentials;
} ServerCredentials;
PyTypeObject pygrpc_ServerCredentialsType;
extern PyTypeObject pygrpc_ServerCredentialsType;
int pygrpc_add_server_credentials(PyObject *module);

@ -51,7 +51,7 @@ typedef enum {
PYGRPC_FINISH_ACCEPTED = 4,
PYGRPC_CLIENT_METADATA_READ = 5,
PYGRPC_FINISHED_CLIENT = 6,
PYGRPC_FINISHED_SERVER = 7,
PYGRPC_FINISHED_SERVER = 7
} pygrpc_tag_type;
typedef struct {

@ -86,7 +86,7 @@ _PACKAGE_DIRECTORIES = {
setuptools.setup(
name='grpcio',
version='0.5.0a1',
version='0.5.0a2',
ext_modules=[_EXTENSION_MODULE],
packages=list(_PACKAGES),
package_dir=_PACKAGE_DIRECTORIES,

@ -32,9 +32,9 @@
<%namespace file="packages.include" import="get_openssl,get_zlib"/>\
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%
allowed_dependencies = set(['gpr', 'grpc', 'gpr_test_util', 'grpc_test_util'])
disallowed_dependencies = set(['end2end_certs'])
buildable_targets = [ target for target in targets
if set(target.deps).issubset(allowed_dependencies) and
if not disallowed_dependencies.intersection(target.deps) and
all([src.endswith('.c') for src in target.src]) and
'windows' in target.platforms ]
c_test_targets = [ target for target in buildable_targets if target.build == 'test' and not target.language == 'c++' ]

@ -39,6 +39,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "test/core/util/grpc_profiler.h"
#include "test/core/util/test_config.h"
@ -165,7 +166,7 @@ static void start_send_status(void) {
tag(FLING_SERVER_SEND_STATUS_FOR_STREAMING)));
}
static void sigint_handler(int x) { got_sigint = 1; }
static void sigint_handler(int x) { _exit(0); }
int main(int argc, char **argv) {
grpc_event *ev;

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save