Reformat style of using PyObject_HEAD

pull/1159/head
Masood Malekghassemi 10 years ago
parent 7a6ecc2f91
commit 5bf4d2ae36
  1. 5
      src/python/src/grpc/_adapter/_call.h
  2. 5
      src/python/src/grpc/_adapter/_channel.h
  3. 3
      src/python/src/grpc/_adapter/_client_credentials.h
  4. 3
      src/python/src/grpc/_adapter/_completion_queue.h
  5. 5
      src/python/src/grpc/_adapter/_server.h
  6. 3
      src/python/src/grpc/_adapter/_server_credentials.h

@ -37,7 +37,10 @@
#include <Python.h> #include <Python.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
typedef struct { PyObject_HEAD grpc_call *c_call; } Call; typedef struct {
PyObject_HEAD;
grpc_call *c_call;
} Call;
PyTypeObject pygrpc_CallType; PyTypeObject pygrpc_CallType;

@ -37,7 +37,10 @@
#include <Python.h> #include <Python.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
typedef struct { PyObject_HEAD grpc_channel *c_channel; } Channel; typedef struct {
PyObject_HEAD;
grpc_channel *c_channel;
} Channel;
PyTypeObject pygrpc_ChannelType; PyTypeObject pygrpc_ChannelType;

@ -38,7 +38,8 @@
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
typedef struct { typedef struct {
PyObject_HEAD grpc_credentials *c_client_credentials; PyObject_HEAD;
grpc_credentials *c_client_credentials;
} ClientCredentials; } ClientCredentials;
PyTypeObject pygrpc_ClientCredentialsType; PyTypeObject pygrpc_ClientCredentialsType;

@ -38,7 +38,8 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
typedef struct { typedef struct {
PyObject_HEAD grpc_completion_queue *c_completion_queue; PyObject_HEAD;
grpc_completion_queue *c_completion_queue;
} CompletionQueue; } CompletionQueue;
PyTypeObject pygrpc_CompletionQueueType; PyTypeObject pygrpc_CompletionQueueType;

@ -37,7 +37,10 @@
#include <Python.h> #include <Python.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
typedef struct { PyObject_HEAD grpc_server *c_server; } Server; typedef struct {
PyObject_HEAD;
grpc_server *c_server;
} Server;
int pygrpc_add_server(PyObject *module); int pygrpc_add_server(PyObject *module);

@ -38,7 +38,8 @@
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
typedef struct { typedef struct {
PyObject_HEAD grpc_server_credentials *c_server_credentials; PyObject_HEAD;
grpc_server_credentials *c_server_credentials;
} ServerCredentials; } ServerCredentials;
PyTypeObject pygrpc_ServerCredentialsType; PyTypeObject pygrpc_ServerCredentialsType;

Loading…
Cancel
Save