From: <dg...@su...> - 2009-01-20 15:45:15
|
Author: savago Date: Tue Jan 20 16:44:06 2009 New Revision: 5207 URL: http://www.opensync.org/changeset/5207 Log: Creating and deleting a XSLT transform context is the same code for both converting from whatever-format to xmlformat and vice-versa. Modified: format-plugins/xsltformat/src/xsltformat.c Modified: format-plugins/xsltformat/src/xsltformat.c ============================================================================== --- format-plugins/xsltformat/src/xsltformat.c Tue Jan 20 13:38:55 2009 (r5206) +++ format-plugins/xsltformat/src/xsltformat.c Tue Jan 20 16:44:06 2009 (r5207) @@ -175,7 +175,7 @@ return TRUE; } -void *init_xslt_to_contact(const char* config, OSyncError **error) +void *initialize_xslt(const char* config, OSyncError **error) { struct xslt_resources *converter = xslt_new(); int result = 0; @@ -190,7 +190,7 @@ } -void fin_xslt_to_contact(void *userdata) +void finalize_xslt(void *userdata) { struct xslt_resources *converter = NULL; if (!userdata) @@ -223,8 +223,8 @@ conv_xslt_to_contact, error); if (!conv) return FALSE; - osync_converter_set_initialize_func(conv, init_xslt_to_contact); - osync_converter_set_finalize_func(conv, fin_xslt_to_contact); + osync_converter_set_initialize_func(conv, initialize_xslt); + osync_converter_set_finalize_func(conv, finalize_xslt); osync_format_env_register_converter(env, conv); osync_converter_unref(conv); @@ -234,7 +234,8 @@ conv_contact_to_xslt, error); if (!conv) return FALSE; - /* e.g. this converter doesn't need init and finalize functions therefore don't set them */ + osync_converter_set_initialize_func(conv, initialize_xslt); + osync_converter_set_finalize_func(conv, finalize_xslt); /* register converter */ osync_format_env_register_converter(env, conv); osync_converter_unref(conv); |