一個C語言函數聲明和定義的編譯問題

最近在看Redis代碼,看到SDS字符串時,有個地方很詭異,代碼以下:html static inline size_t sdslen(const sds s) { struct sdshdr *sh = (void*)(s-(sizeof(struct sdshdr))); return sh->len; } static inline size_t sdsavail(cons
相關文章
相關標籤/搜索