mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add sproto double type (#1221)
Co-authored-by: zixun <lvzxiun@gmail.com>
This commit is contained in:
@@ -944,6 +944,7 @@ sproto_encode(const struct sproto_type *st, void * buffer, int size, sproto_call
|
||||
args.type = type;
|
||||
args.index = 0;
|
||||
switch(type) {
|
||||
case SPROTO_DOUBLE:
|
||||
case SPROTO_TINTEGER:
|
||||
case SPROTO_TBOOLEAN: {
|
||||
union {
|
||||
@@ -1177,6 +1178,7 @@ sproto_decode(const struct sproto_type *st, const void * data, int size, sproto_
|
||||
}
|
||||
} else {
|
||||
switch (f->type) {
|
||||
case SPROTO_DOUBLE:
|
||||
case SPROTO_TINTEGER: {
|
||||
uint32_t sz = todword(currentdata);
|
||||
if (sz == SIZEOF_INT32) {
|
||||
|
||||
Reference in New Issue
Block a user