#36 ✓resolved
Martin S.

[PATCH] Fix return value for PListNode.as_data() in Python binding

Reported by Martin S. | April 18th, 2009 @ 08:58 PM

Fix in patch below. The as_data() method would otherwise just return the bytes till the first null-byte was encountered. Now it works correct and one can check the buffer size with len() aswell.

Comments and changes to this ticket

  • Jonathan Beck

    Jonathan Beck April 19th, 2009 @ 08:05 PM

    Hi Martin,

    Thanks for discovering the bug and for providing a patch. However the solution you provided only works in python. I think i found a generic solution using the SWIG cstring library.

    I also reworked the python constructor, which now is the same for binary and xml buffers.

    Please check that my solution also works for you.

  • Martin S.

    Martin S. April 19th, 2009 @ 10:32 PM

    Superb. Looks much better than my single fix of course and is way more flexible! Thanks, feel free to close the ticket.

  • Jonathan Beck

    Jonathan Beck April 20th, 2009 @ 06:33 AM

    • State changed from “new” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A project around supporting the iPhone in Linux.

See http://libimobiledevice.org

People watching this ticket