Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

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

#36

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.

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

State: resolved
Milestone: none
Assigned to: Jonathan Beck Jonathan Beck

Activity

  1. Jonathan Beck
    Jonathan Beck

    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.

    April 19th, 2009 @ 08:05 PM

  2. Martin S.
    Martin S.

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

    April 19th, 2009 @ 10:32 PM

  3. Jonathan Beck
    Jonathan Beck
    • State changed from new to resolved

    April 20th, 2009 @ 06:33 AM

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.