progrium / darwinkit

Native Mac APIs for Go. Previously known as MacDriver
MIT License
4.42k stars 147 forks source link

Fix bug with size variable's value not being set when map is empty #241

Closed programmingkidx closed 6 months ago

programmingkidx commented 6 months ago

In the type_convertion.m file the method to_c_items() does not set the c_dict.len variable if the size is equal to zero. This pull request changes things so that the variable is set earlier in the method so the size of the array does not stop the c_dict.len variable from being set.

programmingkidx commented 6 months ago

See https://github.com/progrium/macdriver/pull/242 instead.