From 9af12c20515acdd6af5dff099ff2aa57260f364b Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Mon, 20 Oct 2008 21:31:16 +0200 Subject: [PATCH] ucw docs: factual error about custom parsers The cf_journal_block is already called when the system calls the user parser function, no need to call it again. --- ucw/doc/conf.txt | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ucw/doc/conf.txt b/ucw/doc/conf.txt index 8c10ac9b..abc66a96 100644 --- a/ucw/doc/conf.txt +++ b/ucw/doc/conf.txt @@ -166,21 +166,20 @@ should know a few things. The parser needs to support <>. To accomplish that, you have to use the <> for memory allocation. -Furthermore, you need to call @cf_journal_block() before you change -the configuration (eg. before you save the parsed value to the destination -variable). You can use <> macro -instead if it is a simple variable. Now, you need a function with the same signature as <>. Parse the first parameter (the -string), call @cf_journal_block() on the second parameter and store -the data there. You may want to write a dumper function, with -signature of <> (needed for debug -dumps). +string) and store the data in the second parameter. You may want to +write a dumper function, with signature of +<> (needed for debug dumps). -Fill in a <> and use the +Fill in a structure <> and use the new data type in your configuration description with -<>. +<> macro. + +You do not need to call @cf_journal_block() on the variable you store +the result. It is true you change it, but it was stored to journal +before your parser function was called. [[hooks]] Hooks -- 2.39.2