-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
增加一个指定数据类型为int64的方法 #1241
Merged
Merged
增加一个指定数据类型为int64的方法 #1241
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
作为一个基础库,我觉得 lint64 这个函数没有考虑大小端问题。建议改进。 |
我明白了,这个函数只在内存里构造对象。但代码我觉得还是有一些问题的。需要改进。 |
cloudwu
reviewed
Sep 15, 2020
lualib-src/lua-bson.c
Outdated
if (sz != 8) { | ||
return luaL_error(L, "Invalid int64"); | ||
} | ||
int d = *(const int *)buf; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为何是 int 而不是 int64 ?
cloudwu
reviewed
Sep 15, 2020
cloudwu
reviewed
Sep 15, 2020
lualib-src/lua-bson.c
Outdated
@@ -397,7 +397,7 @@ append_one(struct bson *bs, lua_State *L, const char *key, size_t sz, int depth) | |||
break; | |||
case BSON_INT64: { | |||
if (len != 2 + 8) { | |||
luaL_error(L, "Invalid int64"); | |||
luaL_error(L, "Invalid date"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么是 date 不是 int64 ?
wangyi0226
added a commit
to wangyi0226/skynet
that referenced
this pull request
Sep 21, 2020
增加一个指定数据类型为int64的方法 (cloudwu#1241)
xzhovo
added a commit
to xzhovo/skynet
that referenced
this pull request
Feb 1, 2021
【中】增加 stat: add mem stat for jemalloc 【中】sproto add double type 【中】mongo 错误数据有可能导致死循环 (cloudwu#1225) 【低】mysql 预处理执行支持nil参数,nil==NULL (cloudwu#1228) 【高】sharetable.update 时,进行match_thread 对stack_values_tmp 变量会重入。导致match_value 一个nil值。 【中】logger.c:增加时间戳;文件打开方式用a代替w;用skynet程序时间代替系统时间 【高】add api skynet_socket_pause 新增了 pause/resume 的 C API 通知网络底层暂停及延续 socket 的读操作。在 Lua 层,这个过程是自动进行的,不需要业务层主动干预。一旦 lua 服务收到了太多网络包未能被业务层读取(积累在 socket 模块中)将自动发送 pause 消息暂停网络层的接收,当读空缓冲区后,再次发起读请求则会通知网络层重新开启读数据。 【高】在socket.lua 业务层控制,新增最大读取socket buffer 的大小,超过时自动暂停 【低】Invalid addrinfo pointer casues skynet asserted in freeaddrinfo on OpenWRT (arm cpu) (cloudwu#1236) 【低】http sockethelper.socket_error 【中】mongo 增加一个指定数据类型为int64的方法 (cloudwu#1241)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在使用mongodb时,有时候数据没有超过32位,但是需要指定数据类型为int64