summaryrefslogtreecommitdiffstats
path: root/lasso/utils.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Core: add references handling macrosBenjamin Dauvergne2009-01-241-17/+102
| | | | | | | | | | | | | | | | | | * lasso/utils.h: - add macro lasso_transfer_string and lasso_transfer_gobject, to transfer ownership of such objects without copying or their changing reference count. The old containing variable is NULLed. - lasso_list_add_gobject,lasso_list_add_new_gobject: test if the added object is a GObject, if not do not add it and print a warning. - lasso_check_type_equality: this macro use special builtin functions only with GCC (typeof and __builtin_types_compatible_p) and do metaprogramming using anonymous enumeration type to make compile time assertions. It is used - add macros to release XPathObject XPathContext, macro constructor to make reference transfert macros (free dest, nullify dest, copy src to dest without increasing refcount, nullify src), add a macro to transfert xpath objects.
* Core: new goto_exit macro which produces warningsBenjamin Dauvergne2009-01-241-0/+9
| | | | | * lasso/utils.h: similar macro to goto_exit_if_fail but also produce a printed warning.
* Core: new macros for adding string to GListBenjamin Dauvergne2009-01-241-0/+5
| | | | | * lasso/utils.h: - lasso_list_add_string, add a copy of a string to a GList
* Core: Remove unused macro lasso_warn_deprecatedBenjamin Dauvergne2009-01-241-4/+0
| | | | | * lasso/utils.h: remove macros lasso_warn_deprecated, use GCC attributes and gtkdoc markers instead.
* Fix missing includeBenjamin Dauvergne2008-11-051-0/+2
|
* Add new internal function to show safe extractsBenjamin Dauvergne2008-11-051-0/+4
| | | | | | | - lasso/utils.c, lasso/utils.h: New internal api lasso_safe_prefix_string that can show any string taking care of escaping newlines,tabs and non-graphical ou non-ASCII characters.
* Add new utils macrosBenjamin Dauvergne2008-11-041-0/+9
| | | | | | | - lasso/utils.h: - add goto_exit_with_rc a standardized macro that suppose having an 'int rc' variable and an exit label in the current function. - add lasso_release_output_buffer macro
* Fix lasso_assign_node: wrong xmlFreeNodeListBenjamin Dauvergne2008-11-041-1/+1
| | | | | | | * lasso/utils.h: - (lasso_assign_node) This macro wrongly assumes that the destroy function for xmlNode is xmlFreeNodeList but it's xmlFreeNode. xmlFreeNodeList is for xmlNode list of children.
* Many fix to compile with --enable-wsf and --enable-debugging and also toBenjamin Dauvergne2008-09-231-0/+7
| | | | | | | | | | | | | | | | | | remove valgrind errors through python tests. 1. Rename lasso_wsf_profile_new_full for java bindings (cannot subclass in overrides of static methods). 2. Add const modifiers to many functon signatures in bindings/python/wrapper_top.c. 3. add initialisation of private_data->encryption_sym_key_type (to please valgrind) in instance_init of LassoProvider. 4. Add new macro to assign xmlNode, we consider xmlNode to be an immutable value, and always use xmlCopyNode for assignment. The macros is called named lasso_assign_node. 5. Fix segfault, when using xmlSec to encrypt the newly created encrypted node replace the original node inside the xmlDoc structure, and the original node is freed automatically. So you cannot borrow the encrypted if you do not remove it from xmlDoc first.
* * Remove ending blanksBenjamin Dauvergne2008-09-121-6/+6
|
* new empty macro OFTYPE(x) to specify type of GList containersBenjamin Dauvergne2008-08-051-0/+2
|
* * add missing lasso_release_list, add lasso_release_list_of_full, ↵Benjamin Dauvergne2008-08-051-16/+16
| | | | reimplement lasso_release_list_of_* using _full
* add macros to release xmlSec context objectsBenjamin Dauvergne2008-08-051-0/+9
|
* add lasso_release_full to construct other lasso_release_ functions, use it ↵Benjamin Dauvergne2008-08-051-28/+12
| | | | in old definitions
* rename g_unlink_and_release_node to lasso_unlink_and_release_nodeBenjamin Dauvergne2008-08-051-1/+1
|
* Add a macro to emit a «Function is deprecated» warningBenjamin Dauvergne2008-08-051-0/+4
|
* change last g_* macros to lasso_ prefixBenjamin Dauvergne2008-08-051-5/+5
|
* * change g_list_add* to lasso_list_add*Benjamin Dauvergne2008-08-051-3/+3
|
* change g_assign_* to lasso_assgin_* and g_release_* to lasso_release_*Benjamin Dauvergne2008-08-051-12/+12
|
* add macro to assign gobject field, first a simple versionBenjamin Dauvergne2008-08-011-1/+2
|
* beginning of a pool of macros for mem handling, affectation to fields, etc..Benjamin Dauvergne2008-08-011-2/+1
|
* * lasso/utils.h: add utility macros to releases libxml objects, to check nullBenjamin Dauvergne2008-08-011-0/+42
| | | | | parameters or badly typed parameters. add a macro that go to an "exit" label and set the return code variable named "rc".
* fix forgottent arg to g_list_foreachBenjamin Dauvergne2008-08-011-2/+2
|
* added functions to release [list]string/gobject/anyBenjamin Dauvergne2008-08-011-1/+2
|
* add methods to manipulate list of gobjects, and dissociate affectation of ↵Benjamin Dauvergne2008-08-011-2/+1
| | | | fresh object from older objects
* add macro to assign gobject field, first a simple versionBenjamin Dauvergne2008-08-011-1/+2
|
* beginning of a pool of macros for mem handling, affectation to fields, etc..Benjamin Dauvergne2008-08-011-2/+1
|
* added functions to release [list]string/gobject/anyBenjamin Dauvergne2008-08-011-1/+2
|
* add methods to manipulate list of gobjects, and dissociate affectation of ↵Benjamin Dauvergne2008-08-011-2/+1
| | | | fresh object from older objects
* add macro to assign gobject field, first a simple versionBenjamin Dauvergne2008-08-011-1/+2
|
* beginning of a pool of macros for mem handling, affectation to fields, etc..Benjamin Dauvergne2008-08-011-2/+1
|
* reformat utils.hBenjamin Dauvergne2008-05-301-22/+81
|
* fixed too long lines and remove some blank linesDamien Laniel2008-05-301-4/+12
|
* add a new headers <lasso/utils.h> with macros to handle memory like assigning aBenjamin Dauvergne2008-05-221-0/+50
gobject field (work flow, is you augment ref of the new value, decrease the one from the old, and then assign), assigning strings, releasing lists of strings, of gobjects,etc.. the free macros are all called g_release_somehting and they set the released variable to NULL. add a macro to validate GObject parameter types This header is intended to concentre every bit of wisdom for handling pointers and memory, try to use thoses macros in your code. They are not intended to work with weak references (references you do not own), so always g_object_ref in this case (or use g_assign_gobject that does it, when your variable is not needed anymore to g_assign_gobject(var, NULL));