martinling / libserialport

Unofficial personal repository for libserialport - see git://sigrok.org/libserialport for official repo
http://sigrok.org/wiki/Libserialport
GNU Lesser General Public License v3.0
65 stars 34 forks source link

Suggestion about moving sp_port structure definition or documenting it. #16

Closed konstunn closed 8 years ago

konstunn commented 8 years ago

I suggest moving the definition to libserialport.h.in. So that it won't be neccesary to keep the sources (libserialport_internal.h, in particular) for reference.

In other words, sp_port structure should be public.

I can't dereference pointer to sp_port to access its' members name and description because the structure is treated as incomplete type. What is a workaround? Or have I messed up something?

konstunn commented 8 years ago

Sorry, I haven't noticed that there are get-functions like sp_get_port_name() and sp_get_port_description() so there is no need to dereference struct sp_port* to access its' members.