diff options
author | Jonathan Beck | 2009-07-18 12:19:32 +0200 |
---|---|---|
committer | Jonathan Beck | 2009-07-18 12:19:32 +0200 |
commit | ef203c828941d0d97c99a5d8c3c79b2aa0992758 (patch) | |
tree | 0c337a19ff188e619a45efb895815092f4ebbb09 /swig/plist.i | |
parent | 365acdbafd2ff8ffc0a302c7c897f06596d6a1aa (diff) | |
download | libplist-ef203c828941d0d97c99a5d8c3c79b2aa0992758.tar.gz libplist-ef203c828941d0d97c99a5d8c3c79b2aa0992758.tar.bz2 |
Update python binding to use new setters API.
Diffstat (limited to 'swig/plist.i')
-rw-r--r-- | swig/plist.i | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/swig/plist.i b/swig/plist.i index c492c1e..dd0121d 100644 --- a/swig/plist.i +++ b/swig/plist.i @@ -117,6 +117,31 @@ typedef struct { plist_add_sub_data_el($self->node, data, len); } + void set_as_key(char* k) { + plist_set_key_val($self->node, k); + } + + void set_as_string(char* s) { + plist_set_string_val($self->node, s); + } + + void set_as_bool(char b) { + plist_set_bool_val($self->node, b); + } + + void set_as_uint(uint64_t i) { + plist_set_uint_val($self->node, i); + } + + void set_as_real(double d) { + plist_set_real_val($self->node, d); + } + + %cstring_input_binary(char *data, uint64_t len); + void set_as_data(char *data, uint64_t len) { + plist_set_data_val($self->node, data, len); + } + PListNode* get_first_child() { plist_t node = plist_get_first_child( $self->node ); if (node) { |