See also: https://kentonv.github.io/capnproto/
Rob wrote:
You've got alignment issues here - msg will be aligned to support any
type (as malloc's interface specifies) so msg+1 will most likely be on
an odd address, one byte off a highly aligned address. This means if
your struct contains anything other than chars, you'll have UB. This is
On Tue, Jul 1, 2014 at 2:56 PM, Markus Teich markus.te...@stusta.mhn.de wrote:
thanks for your feedback. What about declaring a struct for each message-type:
struct msg_signed_data {
unsigned int op;
struct foo data;
struct bar signature;
};
This should also solve
On Tue, Jul 01, 2014 at 01:56:04PM +0200, Markus Teich wrote:
struct msg_signed_data {
unsigned int op;
struct foo data;
struct bar signature;
};
If this is data that goes across the network then instead of
directly mapping a struct on that data I'd simply have functions
Rob wrote:
You've got alignment issues here - msg will be aligned to support any
type (as malloc's interface specifies) so msg+1 will most likely be on
an odd address, one byte off a highly aligned address. This means if
your struct contains anything other than chars, you'll have UB. This is
On Tue, Jul 01, 2014 at 05:01:43PM +0200, Markus Teich wrote:
Rob wrote:
You've got alignment issues here - msg will be aligned to support any
type (as malloc's interface specifies) so msg+1 will most likely be on
an odd address, one byte off a highly aligned address. This means if
your
On Tue, Jul 1, 2014 at 8:01 AM, Markus Teich markus.te...@stusta.mhn.de wrote:
Rob wrote:
You've got alignment issues here - msg will be aligned to support any
type (as malloc's interface specifies) so msg+1 will most likely be on
an odd address, one byte off a highly aligned address. This
On Mon, Jun 30, 2014 at 08:54:52PM +0200, Markus Teich wrote:
Heyho,
since I did not find any suckless project regarding this issue, I would like
to
ask you guys for some feedback:
unsigned char *msg;
size_t msg_size;
struct foo *msg_data;
struct bar *msg_signature;
msg_size =
Heyho,
since I did not find any suckless project regarding this issue, I would like to
ask you guys for some feedback:
unsigned char *msg;
size_t msg_size;
struct foo *msg_data;
struct bar *msg_signature;
msg_size = sizeof(unsigned char)// op
+ sizeof(struct foo)// data
On 30/06/14, Markus Teich wrote:
Heyho,
Hello there,
since I did not find any suckless project regarding this issue, I
would like to ask you guys for some feedback:
unsigned char *msg;
size_t msg_size;
struct foo *msg_data;
struct bar *msg_signature;
msg_size = sizeof(unsigned char)
10 matches
Mail list logo