摘要: 我们产品的code 用了sqlite的源码: // lang/sql/sqlite/src/hash.h, lang/sql/sqlite/src/hash.c: struct HashElem { ... const char *pKey; void *sqlite3HashInsert(Hash 阅读全文
posted @ 2016-02-25 13:21 brayden 阅读(250) 评论(0) 推荐(0) 编辑
摘要: class Engine { Engine(...) throws Exception { // do some locking // do other things that could throw exception } void close() { // do unlocking } } pu 阅读全文
posted @ 2016-02-25 12:27 brayden 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 修复一个产品bug, 最终定位是memcpy使用的问题. 下面的示例代码: #define N 16 int main() { int arr[N], i; for (i = 0; i < N; i++) arr[i] = i; printf("before memcpy:\n"); prt(arr 阅读全文
posted @ 2016-02-25 11:21 brayden 阅读(216) 评论(0) 推荐(0) 编辑