diff options
-rw-r--r-- | includes/omapip/omapip.h | 5 | ||||
-rw-r--r-- | omapip/support.c | 29 |
2 files changed, 23 insertions, 11 deletions
diff --git a/includes/omapip/omapip.h b/includes/omapip/omapip.h index ecd80061..3d6c9b92 100644 --- a/includes/omapip/omapip.h +++ b/includes/omapip/omapip.h @@ -125,6 +125,7 @@ typedef struct __omapi_object_type_t { isc_result_t (*allocator) (omapi_object_t **, const char *, int); isc_result_t (*sizer) (size_t); size_t size; + isc_result_t (*initialize) (omapi_object_t *, const char *, int); } omapi_object_type_t; #define OMAPI_OBJECT_PREAMBLE \ @@ -418,7 +419,9 @@ isc_result_t omapi_object_type_register (omapi_object_type_t **, const char *, int), isc_result_t (*) (omapi_object_t **, const char *, int), - isc_result_t (*) (size_t), size_t); + isc_result_t (*) (size_t), size_t, + isc_result_t (*) (omapi_object_t *, + const char *, int)); isc_result_t omapi_signal (omapi_object_t *, const char *, ...); isc_result_t omapi_signal_in (omapi_object_t *, const char *, ...); isc_result_t omapi_set_value (omapi_object_t *, omapi_object_t *, diff --git a/omapip/support.c b/omapip/support.c index 3ddc6cbb..7552f885 100644 --- a/omapip/support.c +++ b/omapip/support.c @@ -75,7 +75,7 @@ isc_result_t omapi_init (void) omapi_connection_stuff_values, 0, 0, 0, 0, 0, 0, sizeof - (omapi_connection_object_t)); + (omapi_connection_object_t), 0); if (status != ISC_R_SUCCESS) return status; @@ -87,7 +87,8 @@ isc_result_t omapi_init (void) omapi_listener_signal_handler, omapi_listener_stuff_values, 0, 0, 0, 0, 0, 0, - sizeof (omapi_listener_object_t)); + sizeof (omapi_listener_object_t), + 0); if (status != ISC_R_SUCCESS) return status; @@ -99,7 +100,7 @@ isc_result_t omapi_init (void) omapi_io_signal_handler, omapi_io_stuff_values, 0, 0, 0, 0, 0, 0, - sizeof (omapi_io_object_t)); + sizeof (omapi_io_object_t), 0); if (status != ISC_R_SUCCESS) return status; @@ -111,7 +112,8 @@ isc_result_t omapi_init (void) omapi_generic_signal_handler, omapi_generic_stuff_values, 0, 0, 0, 0, 0, 0, - sizeof (omapi_generic_object_t)); + sizeof (omapi_generic_object_t), + 0); if (status != ISC_R_SUCCESS) return status; @@ -123,7 +125,8 @@ isc_result_t omapi_init (void) omapi_protocol_signal_handler, omapi_protocol_stuff_values, 0, 0, 0, 0, 0, 0, - sizeof (omapi_protocol_object_t)); + sizeof (omapi_protocol_object_t), + 0); if (status != ISC_R_SUCCESS) return status; @@ -135,7 +138,7 @@ isc_result_t omapi_init (void) omapi_protocol_listener_signal, omapi_protocol_listener_stuff, 0, 0, 0, 0, 0, 0, - sizeof (omapi_protocol_listener_object_t))); + sizeof (omapi_protocol_listener_object_t), 0)); if (status != ISC_R_SUCCESS) return status; @@ -147,7 +150,8 @@ isc_result_t omapi_init (void) omapi_message_signal_handler, omapi_message_stuff_values, 0, 0, 0, 0, 0, 0, - sizeof (omapi_message_object_t)); + sizeof (omapi_message_object_t), + 0); if (status != ISC_R_SUCCESS) return status; @@ -158,7 +162,8 @@ isc_result_t omapi_init (void) 0, omapi_waiter_signal_handler, 0, 0, 0, 0, 0, 0, 0, - sizeof (omapi_waiter_object_t)); + sizeof (omapi_waiter_object_t), + 0); if (status != ISC_R_SUCCESS) return status; @@ -171,7 +176,7 @@ isc_result_t omapi_init (void) omapi_auth_key_stuff_values, omapi_auth_key_lookup, 0, 0, 0, 0, 0, - sizeof (omapi_auth_key_t)); + sizeof (omapi_auth_key_t), 0); if (status != ISC_R_SUCCESS) return status; @@ -218,7 +223,10 @@ isc_result_t omapi_object_type_register (omapi_object_type_t **type, (omapi_object_t **, const char *, int), isc_result_t (*sizer) (size_t), - size_t size) + size_t size, + isc_result_t (*initialize) + (omapi_object_t *, + const char *, int)) { omapi_object_type_t *t; @@ -241,6 +249,7 @@ isc_result_t omapi_object_type_register (omapi_object_type_t **type, t -> size = size; t -> freer = freer; t -> allocator = allocator; + t -> initialize = initialize; omapi_object_types = t; if (type) *type = t; |