瀏覽代碼

Updated gendynapi.py to handle thread-safety annotations

Sam Lantinga 3 年之前
父節點
當前提交
3a940ba8ee
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/dynapi/gendynapi.py

+ 3 - 0
src/dynapi/gendynapi.py

@@ -147,6 +147,9 @@ def main():
             func = func.replace("SDL_MALLOC", "");
             func = func.replace("SDL_MALLOC", "");
             func = func.replace("SDL_ALLOC_SIZE2(1, 2)", "");
             func = func.replace("SDL_ALLOC_SIZE2(1, 2)", "");
             func = func.replace("SDL_ALLOC_SIZE(2)", "");
             func = func.replace("SDL_ALLOC_SIZE(2)", "");
+            func = re.sub(" SDL_ACQUIRE\(.*\)", "", func);
+            func = re.sub(" SDL_TRY_ACQUIRE\(.*\)", "", func);
+            func = re.sub(" SDL_RELEASE\(.*\)", "", func);
 
 
             # Should be a valid function here
             # Should be a valid function here
             match = reg_parsing_function.match(func)
             match = reg_parsing_function.match(func)