]> mj.ucw.cz Git - libucw.git/commitdiff
ucw docs: factual error about custom parsers
authorMichal Vaner <vorner@ucw.cz>
Mon, 20 Oct 2008 19:31:16 +0000 (21:31 +0200)
committerMichal Vaner <vorner@ucw.cz>
Mon, 20 Oct 2008 19:31:16 +0000 (21:31 +0200)
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

index 8c10ac9bd5302b66f0aaf8609b9fda8cde11ae50..abc66a966b372fc475f9ba9ff1c7adb6a7023c77 100644 (file)
@@ -166,21 +166,20 @@ should know a few things.
 
 The parser needs to support <<journal,journaling>>. To accomplish that,
 you have to use the <<alloc,configuration mempool>> 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 <<def_CF_JOURNAL_VAR,`CF_JOURNAL_VAR`>> macro
-instead if it is a simple variable.
 
 Now, you need a function with the same signature as
 <<type_cf_parser1,`cf_parser1`>>. 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 <<type_cf_dumper1,`cf_dumper1`>> (needed for debug
-dumps).
+string) and store the data in the second parameter. You may want to
+write a dumper function, with signature of
+<<type_cf_dumper1,`cf_dumper1`>> (needed for debug dumps).
 
-Fill in a <<struct_cf_user_type,structure cf_user_type>> and use the
+Fill in a structure <<struct_cf_user_type,cf_user_type>> and use the
 new data type in your configuration description with
-<<def_CF_USER,`CF_USER` macro>>.
+<<def_CF_USER,`CF_USER`>> 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