]> source.dussan.org Git - rspamd.git/commitdiff
Make section functions public.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 30 Mar 2015 15:19:47 +0000 (16:19 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 30 Mar 2015 15:19:47 +0000 (16:19 +0100)
src/libserver/cfg_rcl.c
src/libserver/cfg_rcl.h

index 786ef711d5f17ad6efa9da4c63b3b74cb7eb85f0..6beda0f0061498d93e94bc0f980a0dc27b9cc07c 100644 (file)
@@ -1073,17 +1073,7 @@ rspamd_rcl_composite_handler (rspamd_mempool_t *pool,
        return TRUE;
 }
 
-/**
- * Add new section to the configuration
- * @param top top section
- * @param name the name of the section
- * @param handler handler function for all attributes
- * @param type type of object handled by a handler
- * @param required whether at least one of these sections is required
- * @param strict_type turn on strict check for types for this section
- * @return newly created structure
- */
-static inline struct rspamd_rcl_section *
+struct rspamd_rcl_section *
 rspamd_rcl_add_section (struct rspamd_rcl_section **top,
        const gchar *name, rspamd_rcl_handler_t handler,
        enum ucl_type type, gboolean required, gboolean strict_type)
@@ -1100,16 +1090,7 @@ rspamd_rcl_add_section (struct rspamd_rcl_section **top,
        return new;
 }
 
-/**
- * Add a default handler for a section
- * @param section section pointer
- * @param name name of param
- * @param handler handler of param
- * @param offset offset in a structure
- * @param flags flags for the parser
- * @return newly created structure
- */
-static inline struct rspamd_rcl_default_handler_data *
+struct rspamd_rcl_default_handler_data *
 rspamd_rcl_add_default_handler (struct rspamd_rcl_section *section,
        const gchar *name,
        rspamd_rcl_handler_t handler,
index fe06d95a092083a16d53d1503a99503617225879..278c69473a3ba87404bf7fe2d732d7c4c5b4df46 100644 (file)
@@ -76,7 +76,36 @@ typedef gboolean (*rspamd_rcl_handler_t) (rspamd_mempool_t *pool,
  */
 typedef void (*rspamd_rcl_section_fin_t)(rspamd_mempool_t *pool, gpointer ud);
 
+/**
+ * Add a default handler for a section
+ * @param section section pointer
+ * @param name name of param
+ * @param handler handler of param
+ * @param offset offset in a structure
+ * @param flags flags for the parser
+ * @return newly created structure
+ */
+struct rspamd_rcl_default_handler_data * rspamd_rcl_add_default_handler (
+       struct rspamd_rcl_section *section,
+       const gchar *name,
+       rspamd_rcl_handler_t handler,
+       gsize offset,
+       gint flags);
 
+/**
+ * Add new section to the configuration
+ * @param top top section
+ * @param name the name of the section
+ * @param handler handler function for all attributes
+ * @param type type of object handled by a handler
+ * @param required whether at least one of these sections is required
+ * @param strict_type turn on strict check for types for this section
+ * @return newly created structure
+ */
+struct rspamd_rcl_section * rspamd_rcl_add_section (
+       struct rspamd_rcl_section **top,
+       const gchar *name, rspamd_rcl_handler_t handler,
+       enum ucl_type type, gboolean required, gboolean strict_type);
 
 /**
  * Init common sections known to rspamd