Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: third_party/libevent/test/regress.gen.h

Issue 412006: posix: upgrade libevent from 1.4.7 to 1.4.13 (Closed)
Patch Set: better readme Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libevent/test/regress.gen.h
diff --git a/third_party/libevent/test/regress.gen.h b/third_party/libevent/test/regress.gen.h
index 4232b33a4bebdc5b912a897ec0bdf97a95c28d04..b1feacd9ebc68ceffb9a8025bacad555619fadfd 100644
--- a/third_party/libevent/test/regress.gen.h
+++ b/third_party/libevent/test/regress.gen.h
@@ -10,8 +10,13 @@
#include <stdint.h>
#endif
#define EVTAG_HAS(msg, member) ((msg)->member##_set == 1)
+#ifdef __GNUC__
#define EVTAG_ASSIGN(msg, member, args...) (*(msg)->base->member##_assign)(msg, ## args)
#define EVTAG_GET(msg, member, args...) (*(msg)->base->member##_get)(msg, ## args)
+#else
+#define EVTAG_ASSIGN(msg, member, ...) (*(msg)->base->member##_assign)(msg, ## __VA_ARGS__)
+#define EVTAG_GET(msg, member, ...) (*(msg)->base->member##_get)(msg, ## __VA_ARGS__)
+#endif
#define EVTAG_ADD(msg, member) (*(msg)->base->member##_add)(msg)
#define EVTAG_LEN(msg, member) ((msg)->member##_length)
@@ -51,10 +56,10 @@ struct msg {
int run_length;
int run_num_allocated;
- uint8_t from_name_set;
- uint8_t to_name_set;
- uint8_t attack_set;
- uint8_t run_set;
+ ev_uint8_t from_name_set;
+ ev_uint8_t to_name_set;
+ ev_uint8_t attack_set;
+ ev_uint8_t run_set;
};
struct msg *msg_new(void);
@@ -63,9 +68,9 @@ void msg_clear(struct msg *);
void msg_marshal(struct evbuffer *, const struct msg *);
int msg_unmarshal(struct msg *, struct evbuffer *);
int msg_complete(struct msg *);
-void evtag_marshal_msg(struct evbuffer *, uint32_t,
+void evtag_marshal_msg(struct evbuffer *, ev_uint32_t,
const struct msg *);
-int evtag_unmarshal_msg(struct evbuffer *, uint32_t,
+int evtag_unmarshal_msg(struct evbuffer *, ev_uint32_t,
struct msg *);
int msg_from_name_assign(struct msg *, const char *);
int msg_from_name_get(struct msg *, char * *);
@@ -92,8 +97,8 @@ struct kill_access_ {
int (*weapon_get)(struct kill *, char * *);
int (*action_assign)(struct kill *, const char *);
int (*action_get)(struct kill *, char * *);
- int (*how_often_assign)(struct kill *, const uint32_t);
- int (*how_often_get)(struct kill *, uint32_t *);
+ int (*how_often_assign)(struct kill *, const ev_uint32_t);
+ int (*how_often_get)(struct kill *, ev_uint32_t *);
};
struct kill {
@@ -101,11 +106,11 @@ struct kill {
char *weapon_data;
char *action_data;
- uint32_t how_often_data;
+ ev_uint32_t how_often_data;
- uint8_t weapon_set;
- uint8_t action_set;
- uint8_t how_often_set;
+ ev_uint8_t weapon_set;
+ ev_uint8_t action_set;
+ ev_uint8_t how_often_set;
};
struct kill *kill_new(void);
@@ -114,16 +119,16 @@ void kill_clear(struct kill *);
void kill_marshal(struct evbuffer *, const struct kill *);
int kill_unmarshal(struct kill *, struct evbuffer *);
int kill_complete(struct kill *);
-void evtag_marshal_kill(struct evbuffer *, uint32_t,
+void evtag_marshal_kill(struct evbuffer *, ev_uint32_t,
const struct kill *);
-int evtag_unmarshal_kill(struct evbuffer *, uint32_t,
+int evtag_unmarshal_kill(struct evbuffer *, ev_uint32_t,
struct kill *);
int kill_weapon_assign(struct kill *, const char *);
int kill_weapon_get(struct kill *, char * *);
int kill_action_assign(struct kill *, const char *);
int kill_action_get(struct kill *, char * *);
-int kill_how_often_assign(struct kill *, const uint32_t);
-int kill_how_often_get(struct kill *, uint32_t *);
+int kill_how_often_assign(struct kill *, const ev_uint32_t);
+int kill_how_often_get(struct kill *, ev_uint32_t *);
/* --- kill done --- */
/* Tag definition for run */
@@ -138,23 +143,23 @@ enum run_ {
struct run_access_ {
int (*how_assign)(struct run *, const char *);
int (*how_get)(struct run *, char * *);
- int (*some_bytes_assign)(struct run *, const uint8_t *, uint32_t);
- int (*some_bytes_get)(struct run *, uint8_t * *, uint32_t *);
- int (*fixed_bytes_assign)(struct run *, const uint8_t *);
- int (*fixed_bytes_get)(struct run *, uint8_t **);
+ int (*some_bytes_assign)(struct run *, const ev_uint8_t *, ev_uint32_t);
+ int (*some_bytes_get)(struct run *, ev_uint8_t * *, ev_uint32_t *);
+ int (*fixed_bytes_assign)(struct run *, const ev_uint8_t *);
+ int (*fixed_bytes_get)(struct run *, ev_uint8_t **);
};
struct run {
struct run_access_ *base;
char *how_data;
- uint8_t *some_bytes_data;
- uint32_t some_bytes_length;
- uint8_t fixed_bytes_data[24];
+ ev_uint8_t *some_bytes_data;
+ ev_uint32_t some_bytes_length;
+ ev_uint8_t fixed_bytes_data[24];
- uint8_t how_set;
- uint8_t some_bytes_set;
- uint8_t fixed_bytes_set;
+ ev_uint8_t how_set;
+ ev_uint8_t some_bytes_set;
+ ev_uint8_t fixed_bytes_set;
};
struct run *run_new(void);
@@ -163,16 +168,16 @@ void run_clear(struct run *);
void run_marshal(struct evbuffer *, const struct run *);
int run_unmarshal(struct run *, struct evbuffer *);
int run_complete(struct run *);
-void evtag_marshal_run(struct evbuffer *, uint32_t,
+void evtag_marshal_run(struct evbuffer *, ev_uint32_t,
const struct run *);
-int evtag_unmarshal_run(struct evbuffer *, uint32_t,
+int evtag_unmarshal_run(struct evbuffer *, ev_uint32_t,
struct run *);
int run_how_assign(struct run *, const char *);
int run_how_get(struct run *, char * *);
-int run_some_bytes_assign(struct run *, const uint8_t *, uint32_t);
-int run_some_bytes_get(struct run *, uint8_t * *, uint32_t *);
-int run_fixed_bytes_assign(struct run *, const uint8_t *);
-int run_fixed_bytes_get(struct run *, uint8_t **);
+int run_some_bytes_assign(struct run *, const ev_uint8_t *, ev_uint32_t);
+int run_some_bytes_get(struct run *, ev_uint8_t * *, ev_uint32_t *);
+int run_fixed_bytes_assign(struct run *, const ev_uint8_t *);
+int run_fixed_bytes_get(struct run *, ev_uint8_t **);
/* --- run done --- */
#endif /* ___REGRESS_RPC_ */

Powered by Google App Engine
This is Rietveld 408576698