qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/10] Introduce qmisc module


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH 01/10] Introduce qmisc module
Date: Thu, 15 Oct 2009 17:39:36 +0100
User-agent: Mutt/1.4.1i

On Thu, Oct 15, 2009 at 12:26:22PM -0300, Luiz Capitulino wrote:
> On Thu, 15 Oct 2009 09:02:48 -0500
> Anthony Liguori <address@hidden> wrote:
> 
> > 
> > If we're introducing third-party code under a new license, we need to 
> > update the top-level LICENSE file.  I took a brief look and it wasn't 
> > immediately clear that this license is GPL compatible.  According to the 
> > FSF, certain versions of this license are incompatible and some are 
> > compatible.  I think it would have been better to just write something 
> > from scratch...
> 
>  According to the Python's LICENSE file it's compatible since 2001
> (2.0.1 release).
> 
> > > +            case '[':
> > > +                return do_mklist(fmt, args, ']', count_format(*fmt, 
> > > ']'));
> > >   
> > 
> > Because this is bizarre.  It looks ahead to count the number of 
> > arguments which is a very strange way to parse something like this.
> > 
> > Why not a simple recursive decent parser?
> 
>  I could try it, but I think this is going to take some time as
> I would have to read more about it.
> 
>  I thought the Python's implementation was a good idea as we're short
> in time and it was easy to adapt and is widely used in production.

There are at least 6  standalone, pure C [1] json parsers available 
already, some of which let you do json formatting too. So writing a
new parser, or untangling one from python seems like more trouble than
its worth to me. Likewise for generating formatted JSON output.

For QMP experimentation in libvirt I've started off by just grabbing
the json.h & json.c files from an existing impl

  http://mjson.svn.sourceforge.net/viewvc/mjson/trunk/src/

which are LGPLv2+  licensed, and copied them into libvirt source tree. 
They provide quite a nice simple API for both parsing & formatting
and integrate very easily with our codebase.

Regards,
Daniel

[1] See http://json.org/
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]