Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[generator] Fix smart enum FieldAttribute LibraryName generation #2376

Merged
merged 1 commit into from
Jul 26, 2017

Commits on Jul 26, 2017

  1. [generator] Fix smart enum FieldAttribute LibraryName generation

    This fix is needed by PDFKit because it is a remapped framework[0],
    the current code generates incorrect FieldAttribute on smart enums
    because it uses `fa.LibraryName` as first option and this causes
    remmaped frameworks have incorrect LibraryName generated for example
    if a Field uses `+CoreImage` as `LibraryName` the following incorrect
    code is generated:
    
    ```
    	[Field ("First", "+CoreImage")]
    	internal unsafe static IntPtr First {
    		get {
    			fixed (IntPtr *storage = &values [0])
    				return Dlfcn.CachePointer (Libraries.+CoreImage.Handle, "First", storage);
    		}
    	}
    ```
    
    [0]: https://github.com/xamarin/xamarin-macios/blob/f5956d6cc1eb5dfa7bab16628cf282d40237f64e/src/generator.cs#L5985
    dalexsoto committed Jul 26, 2017
    Configuration menu
    Copy the full SHA
    2a8df05 View commit details
    Browse the repository at this point in the history