randomPoison / cs-bindgen

Experiment in using Rust to build a library that can be loaded by Unity across multiple platforms
4 stars 0 forks source link

Correctly handle long function argument names #68

Closed randomPoison closed 4 years ago

randomPoison commented 4 years ago

This fixes a bug where long function argument names (really any name with at least one _ word separator in it) would result in invalid code on the C# side. This was because we were converting the argument names to camelCase in the function declaration, but weren't converting them when using them in the function body, resulting in code that referenced variables names that didn't exist.

In fixing this bug I've also reorganized some of the integration test code such that function and method tests are in their own modules.