summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2010-04-18Endianness, alignment and type-punning fixes for binary plist supportGravatar Julien BLACHE1-13/+63
- endianness issues: on big endian machines, writing out only part of an integer was broken (get_needed_bytes(x) < sizeof(x)) -> shift integer before memcpy() on big endian machines - alignment issues: unaligned reads when loading binary plist. Leads to slow runtime performance (kernel trapping and fixing things up), SIGBUS (kernel not helping us out) -> introduce get_unaligned() and have the compiler generate the code needed for the unaligned access (note that there remains unaligned accesses that I haven't been able to track down - I've seen 2 of them with test #2) - type-punning issues: breaking strict aliasing rules can lead to unexpected results as the compiler takes full advantage of the aliasing while optimizing -> introduce the plist_uint_ptr union instead of casting pointers Tested on amd64, alpha and hppa.
2010-04-06plist_to_xml: use POSIX locale to make sure '.' is used for floatsGravatar Nikias Bassen1-0/+14
In locales like German, a ',' is used as a decimal separator. When the program calling plist_to_xml uses LC_NUMBER with something different than a '.', parsing of the resulting XML document fails. This patch fixes it.
2010-04-06plist_to_xml: copy terminating 0-byte given from xmlDocDumpMemoryGravatar Nikias Bassen1-2/+3
This makes it possible to process the resulting char* directly as a c-string without further copying.
2010-03-24Fix armel floating point endianess (LP: #541879)Gravatar Alexander Sack1-6/+26
* on armel system floating poing data can have different endianess than rest of types; hence we fix arm endianess for defined(__VFP_FP__) to be big/native; this also applies for data parsing/writing * date parsing didnt flip the endianess back for little endian systems when reading the values causing test failures; we fix this by ensuring float endianess is applied when parsing
2010-03-03Copy xml buffer to malloced buffer to prevent free / xmlFree mixing.Gravatar Jonathan Beck1-2/+9
2010-01-21Fix some warningsGravatar Jonathan Beck3-38/+6
2010-01-14Make sure to convert predefined xml entities in xml outputGravatar Martin Szulecki1-1/+6
For string nodes, a set of special characters must be converted to predefined xml entities. This patch adds an entitiy test case for this and makes libplist pass it fine by explicitly adding text nodes.
2009-11-28Remove last includes of non-existing Utils.hGravatar Martin Szulecki2-2/+0
2009-11-19don't leak GNodes in plist_freeGravatar Christophe Fergeau1-1/+1
Before recursing over its children, plist_free_node started by detaching the current GNode from its parent which means that calling g_node_destroy on the root of the tree was freeing only the top-level GNode while what was intended was to free the whole tree. Don't leak memory by not detaching children GNodes from their parents so that g_node_destroy on the toplevel GNode can clean everything.
2009-11-19add missing break; in switch statementGravatar Christophe Fergeau1-0/+2
The 2nd missing break was harmless since it fell through the default: case which has a break, but it makes things more robust if we were ever to add new cases to this switch. The 1st missing break; was causing warnings in valgrind since we ended up calling strdup on a memory zone not containing a \0 character.
2009-11-11Fix removal of the Utils class.Gravatar Jonathan Beck3-7/+6
2009-11-11Move some methods and drop Utils class in C++ binding.Gravatar Jonathan Beck4-110/+83
2009-11-10Remove deprecated functions from API.Gravatar Jonathan Beck1-189/+0
2009-11-10Do not free plist node twice in Dictionary destructor.Gravatar Jonathan Beck1-1/+0
2009-11-10Do not export internal functions symbols.Gravatar Jonathan Beck1-4/+4
2009-11-10Remove wrongly exposed SetParent method.Gravatar Jonathan Beck4-18/+18
2009-11-04Add GetNodeIdex and GetNodeKey methods.Gravatar Jonathan Beck2-0/+18
2009-10-28Format sources to ANSI style using AStyle (astyle --style=ansi).Gravatar Jonathan Beck15-1724/+1838
2009-10-28Unlink previous node in SetParent().Gravatar Jonathan Beck1-0/+11
2009-10-28Fix build for MSVC9.Gravatar Jonathan Beck12-9/+26
2009-10-26Change name of input argument as 'in' is a reserved keyword in python.Gravatar Jonathan Beck1-4/+4
2009-10-26Add Set/Get Parent and a helper to create a Node from a plist_t.Gravatar Jonathan Beck11-224/+88
2009-10-18Tweak Dictioonary interface a bit.Gravatar Jonathan Beck1-1/+10
2009-10-17Fixes for dates.Gravatar Jonathan Beck2-3/+4
2009-10-17Implement Date object.Gravatar Jonathan Beck1-12/+15
2009-10-17Install C++ binding.Gravatar Jonathan Beck1-1/+3
2009-10-16Fix key valuation in dictionary loop.Gravatar Jonathan Beck1-1/+1
2009-10-16Fix Node lifecycle and change argument as reference to const reference.Gravatar Jonathan Beck10-48/+134
2009-10-15Fix various mistakes in C++ bindings.Gravatar Jonathan Beck8-6/+108
2009-10-13Add C++ binding.Gravatar Jonathan Beck12-0/+1000
2009-10-13Add path accessor util function.Gravatar Jonathan Beck1-25/+56
2009-10-11Fix dict length.Gravatar Jonathan Beck1-1/+1
2009-10-11Restore plist_dict_get_size function.Gravatar Jonathan Beck1-0/+9
2009-10-11Add function to change a node's type.Gravatar Jonathan Beck1-3/+35
2009-10-11Protect plist_free against NULL nodes.Gravatar Jonathan Beck1-2/+4
2009-10-11Fix dict iteration.Gravatar Jonathan Beck1-5/+14
2009-10-10Abstract iter base type.Gravatar Jonathan Beck1-5/+5
2009-10-10Fix dict iteration.Gravatar Jonathan Beck1-1/+1
2009-10-10Add dict iteration. Add functions to retrieve index and key from node.Gravatar Jonathan Beck1-5/+38
2009-10-10Reverse argument for dicts to make it clearer.Gravatar Jonathan Beck1-6/+7
2009-10-10Rework public API to make it more consistent.Gravatar Jonathan Beck1-112/+307
2009-09-06Fix boolean length in binary parsingGravatar Jonathan Beck1-0/+2
2009-07-18Fix copy_node to also copy key nodes.Gravatar Jonathan Beck1-1/+2
2009-07-18Add function to get parent node in API and python bindings.Gravatar Jonathan Beck1-0/+5
2009-07-14Make sure to also copy string/data buffers when cloning the node data structGravatar Martin Szulecki1-0/+13
2009-07-09Make copy_plist actually copy plists (previously always returning NULL).Gravatar Jonathan Beck1-5/+11
2009-07-08Unlink node from tree when freeing.Gravatar Jonathan Beck1-0/+1
2009-07-08Add a deep copy function and value setters for nodes.Gravatar Jonathan Beck3-21/+131
2009-04-28Merge ascii and unicode handling in PLIST_STRING using UTF-8. Remove unicode ↵Gravatar Jonathan Beck4-87/+44
related declaration in API (breaks API&ABI)
2009-04-28Fix bad type for date elementGravatar Jonathan Beck1-1/+1