mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
fix support of fixed-sized entries in event_rpcgen
svn:r885
This commit is contained in:
parent
0a66700e00
commit
33bb64c1e0
@ -6,6 +6,7 @@ Changes in 1.4.5-stable:
|
||||
o Rename INPUT and OUTPUT to EVRPC_INPUT and EVRPC_OUTPUT. Retain INPUT/OUTPUT aliases on on-win32 platforms for backwards compatibility.
|
||||
o Do not use SO_REUSEADDR when connecting
|
||||
o Fix Windows build
|
||||
o Fix a bug in event_rpcgen when generated fixed-sized entries
|
||||
|
||||
Changes in 1.4.4-stable:
|
||||
o Correct the documentation on buffer printf functions.
|
||||
|
@ -446,7 +446,7 @@ class EntryBytes(Entry):
|
||||
Entry.__init__(self, type, name, tag)
|
||||
|
||||
self._length = length
|
||||
self._ctype = 'uint32_t'
|
||||
self._ctype = 'uint8_t'
|
||||
|
||||
def GetDeclaration(self, funcname):
|
||||
code = [ 'int %s(struct %s *, %s **);' % (
|
||||
@ -518,7 +518,6 @@ class EntryBytes(Entry):
|
||||
def CodeNew(self, name):
|
||||
code = ['memset(%s->%s_data, 0, sizeof(%s->%s_data));' % (
|
||||
name, self._name, name, self._name)]
|
||||
code.extend(Entry.CodeNew(self, name))
|
||||
return code
|
||||
|
||||
def Verify(self):
|
||||
|
@ -1363,6 +1363,8 @@ rpc_test(void)
|
||||
exit(1);
|
||||
}
|
||||
EVTAG_ASSIGN(run, how, "very fast but with some data in it");
|
||||
EVTAG_ASSIGN(run, fixed_bytes,
|
||||
(unsigned char*)"012345678901234567890123");
|
||||
}
|
||||
|
||||
if (msg_complete(msg) == -1) {
|
||||
|
@ -15,4 +15,6 @@ struct kill {
|
||||
|
||||
struct run {
|
||||
string how = 1;
|
||||
optional bytes some_bytes = 2;
|
||||
bytes fixed_bytes[24] = 3;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user