protobuf and python both expect a machine-sized type, but int is only 32-bit on 64-architectures.

--- a/pg_query.h
+++ b/pg_query.h
@@ -2,6 +2,7 @@
 #define PG_QUERY_H
 
 #include <stdint.h>
+#include <sys/types.h>
 
 typedef struct {
 	char* message; // exception message
@@ -13,7 +14,7 @@ typedef struct {
 } PgQueryError;
 
 typedef struct {
-  unsigned int len;
+  size_t len;
   char* data;
 } PgQueryProtobuf;
 
--- a/examples/scan.c
+++ b/examples/scan.c
@@ -39,7 +39,7 @@ int main() {
     } else {
       scan_result = pg_query__scan_result__unpack(NULL, result.pbuf.len, (void *) result.pbuf.data);
 
-      printf("  version: %d, tokens: %ld, size: %d\n", scan_result->version, scan_result->n_tokens, result.pbuf.len);
+      printf("  version: %d, tokens: %ld, size: %zu\n", scan_result->version, scan_result->n_tokens, result.pbuf.len);
       for (j = 0; j < scan_result->n_tokens; j++) {
         scan_token = scan_result->tokens[j];
         token_kind = protobuf_c_enum_descriptor_get_value(&pg_query__token__descriptor, scan_token->token);
