Commit 4333eee8 authored by Alvaro Herrera's avatar Alvaro Herrera

doc: bgw_main takes a Datum argument, not void *.

Per report from James Harper.
parent 6bfa88ac
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<para> <para>
The structure <structname>BackgroundWorker</structname> is defined thus: The structure <structname>BackgroundWorker</structname> is defined thus:
<programlisting> <programlisting>
typedef void (*bgworker_main_type)(void *main_arg); typedef void (*bgworker_main_type)(Datum main_arg);
typedef struct BackgroundWorker typedef struct BackgroundWorker
{ {
char bgw_name[BGW_MAXLEN]; char bgw_name[BGW_MAXLEN];
...@@ -107,7 +107,7 @@ typedef struct BackgroundWorker ...@@ -107,7 +107,7 @@ typedef struct BackgroundWorker
<para> <para>
<structfield>bgw_main</structfield> is a pointer to the function to run when <structfield>bgw_main</structfield> is a pointer to the function to run when
the process is started. This function must take a single argument of type the process is started. This function must take a single argument of type
<type>void *</> and return <type>void</>. <type>Datum</> and return <type>void</>.
<structfield>bgw_main_arg</structfield> will be passed to it as its only <structfield>bgw_main_arg</structfield> will be passed to it as its only
argument. Note that the global variable <literal>MyBgworkerEntry</literal> argument. Note that the global variable <literal>MyBgworkerEntry</literal>
points to a copy of the <structname>BackgroundWorker</structname> structure points to a copy of the <structname>BackgroundWorker</structname> structure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment