(mu_sieve_machine_inherit_report): Replace by mu_sieve_machine_inherit
Showing
2 changed files
with
13 additions
and
5 deletions
... | @@ -205,8 +205,8 @@ int mu_sieve_vlist_compare (mu_sieve_value_t * a, mu_sieve_value_t * b, | ... | @@ -205,8 +205,8 @@ int mu_sieve_vlist_compare (mu_sieve_value_t * a, mu_sieve_value_t * b, |
205 | int mu_sieve_machine_init (mu_sieve_machine_t * mach, void *data); | 205 | int mu_sieve_machine_init (mu_sieve_machine_t * mach, void *data); |
206 | int mu_sieve_machine_dup (mu_sieve_machine_t const in, | 206 | int mu_sieve_machine_dup (mu_sieve_machine_t const in, |
207 | mu_sieve_machine_t *out); | 207 | mu_sieve_machine_t *out); |
208 | void mu_sieve_machine_inherit_report (mu_sieve_machine_t child, | 208 | int mu_sieve_machine_inherit (mu_sieve_machine_t const in, |
209 | mu_sieve_machine_t parent); | 209 | mu_sieve_machine_t *out); |
210 | void mu_sieve_machine_destroy (mu_sieve_machine_t * pmach); | 210 | void mu_sieve_machine_destroy (mu_sieve_machine_t * pmach); |
211 | int mu_sieve_machine_add_destructor (mu_sieve_machine_t mach, | 211 | int mu_sieve_machine_add_destructor (mu_sieve_machine_t mach, |
212 | mu_sieve_destructor_t destr, void *ptr); | 212 | mu_sieve_destructor_t destr, void *ptr); | ... | ... |
... | @@ -368,14 +368,22 @@ mu_sieve_machine_init (mu_sieve_machine_t *pmach, void *data) | ... | @@ -368,14 +368,22 @@ mu_sieve_machine_init (mu_sieve_machine_t *pmach, void *data) |
368 | return 0; | 368 | return 0; |
369 | } | 369 | } |
370 | 370 | ||
371 | void | 371 | int |
372 | mu_sieve_machine_inherit_report (mu_sieve_machine_t child, | 372 | mu_sieve_machine_inherit (mu_sieve_machine_t const parent, |
373 | mu_sieve_machine_t parent) | 373 | mu_sieve_machine_t *pmach) |
374 | { | 374 | { |
375 | mu_sieve_machine_t child; | ||
376 | int rc; | ||
377 | |||
378 | rc = mu_sieve_machine_init (&child, parent->data); | ||
379 | if (rc) | ||
380 | return rc; | ||
375 | child->logger = parent->logger; | 381 | child->logger = parent->logger; |
376 | child->debug = parent->debug; | 382 | child->debug = parent->debug; |
377 | child->debug_level = parent->debug_level; | 383 | child->debug_level = parent->debug_level; |
378 | child->debug_printer = parent->debug_printer; | 384 | child->debug_printer = parent->debug_printer; |
385 | *pmach = child; | ||
386 | return 0; | ||
379 | } | 387 | } |
380 | 388 | ||
381 | int | 389 | int | ... | ... |
-
Please register or sign in to post a comment