herumi / xbyak

A JIT assembler for x86/x64 architectures supporting MMX, SSE (1-4), AVX (1-2, 512), FPU, APX, and AVX10.2
BSD 3-Clause "New" or "Revised" License
2.05k stars 278 forks source link

make Xbyak::local::l_err inline with block scope static TLS l_error #107

Closed sbogusev closed 4 years ago

sbogusev commented 4 years ago

This PR updates the exception-less error handling by (i) having a static TLS l_error in the scope of int l_err() function, and (ii) making this function inline which ensures that there will be only one definition of the function in a project. Ultimately, instead of having one l_err per object file, this PR enables having one l_err for an entire project.

herumi commented 4 years ago

Thank you for the PR. I've merged it.