[swift-dev] Swift C enum Case Mapping

Ryan Lovelett swift-dev at ryan.lovelett.me
Sun Jan 10 15:18:30 CST 2016


Austin,

I guess I should say that the `typedef` is coming from a Linux kernel
header[1]. So I don't think I'm going to be able to add any macros to
the definition.

What do you mean about alt-click? Alt click where?

On Sun, Jan 10, 2016, at 04:12 PM, Austin Zheng wrote:
> fe_type is being imported as a struct (alt-click 'fe_type' in
> Swift). I think if you want it to be imported as an enum you need to
> use the NS_ENUM macro in the definition, which might not be possible
> in your case.
>
> Austin
>
>> On Jan 10, 2016, at 1:06 PM, Ryan Lovelett via swift-dev <swift-
>> dev at swift.org> wrote:
>>
>> typedef enum fe_type { FE_QPSK, FE_QAM, FE_OFDM, FE_ATSC } fe_type_t;



Links:

  1. http://lxr.free-electrons.com/source/include/linux/dvb/frontend.h?v=3.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160110/6ecb24c1/attachment.html>


More information about the swift-dev mailing list