Hi,

On Fri, Feb 22, 2013 at 08:54:40AM +0000, R. Diez wrote:
> How come PulseView ends up including Python headers through sigrokdecode.h? I 
> saw this in libsigrokdecode :
> 
> #include <Python.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
> 
> This "must be included first" rule propagates to sigrokdecode.h and then to 
> anything that includes it, so I find it rather annoying. Imagine if every 
> include file wanted to the be first one. I guess this is a problem in Python, 
> the symbols they need to define should actually be defined at makefile level, 
> but that's something we cannot fix in this project.

The order of the #includes is purely cosmetic, <Python.h> doesn't _have_
to be the first in theory, but that's unrelated to your question below.

 
> However, I was hoping that, if the GUI is just using the Python decoders, 
> they 
> would be encapsulated in libsigrokdecode so that the GUI itself wouldn't need 
> to know anything 
> about Python.

I agree that it would be nice if libsigrokdecode wouldn't have any Python 
internals
as part of its public API. We might do some work in some later version
towards that goal. However, as of today, stuff like Py_Object (and others) _is_
part of the API (and in sigrokdecode.h), thus the above #include <Python.h>
is needed in sigrokdecode.h.


> By the way, I suspect sigrok-cli is broken, I'm getting this error message:
> 
> CC     sigrok-cli.o
> sigrok-cli.c: In function ‘load_input_file_format’:
> sigrok-cli.c:1192:3: error: too few arguments to function ‘in->format->init’

Thanks for the report, we'll fix that soonish.

 
Cheers, Uwe.
-- 
http://hermann-uwe.de     | http://sigrok.org
http://randomprojects.org | http://unmaintained-free-software.org

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to