Index: include/freeDiameter/freeDiameter.h
===================================================================
--- include/freeDiameter/freeDiameter.h	(revision 618)
+++ include/freeDiameter/freeDiameter.h	(revision 620)
@@ -327,5 +327,5 @@
  * !0	: An error occurred.
  */
-int fd_peer_getbyid( char * diamid, struct peer_hdr ** S_OUT(peer) );
+int fd_peer_getbyid( char * diamid, struct peer_hdr ** peer );
 
 /*
@@ -550,5 +550,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** S_OUT(handler) );
+int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** handler );
 /*
  * CALLBACK:	rt_fwd_cb
@@ -624,5 +624,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg * msg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** S_OUT(handler) );
+int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg * msg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** handler );
 /*
  * CALLBACK:	rt_out_cb
@@ -684,6 +684,6 @@
 
 int fd_event_send(struct fifo *queue, int code, size_t datasz, void * data);
-int fd_event_get(struct fifo *queue, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data));
-int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data));
+int fd_event_get(struct fifo *queue, int * code, size_t * datasz, void ** data);
+int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int * code, size_t * datasz, void ** data);
 void fd_event_destroy(struct fifo **queue, void (*free_cb)(void * data));
 const char * fd_ev_str(int event);
@@ -744,5 +744,5 @@
 int fd_app_merge(struct fd_list * list, application_id_t aid, vendor_id_t vid, int auth, int acct);
 int fd_app_check(struct fd_list * list, application_id_t aid, struct fd_app **detail);
-int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * S_OUT(common_found));
+int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * common_found);
 int fd_app_empty(struct fd_list * list);
 
Index: include/freeDiameter/libfreeDiameter.h
===================================================================
--- include/freeDiameter/libfreeDiameter.h	(revision 618)
+++ include/freeDiameter/libfreeDiameter.h	(revision 620)
@@ -77,12 +77,4 @@
 #include <libgen.h>	/* for basename if --dbg_file is specified */
 #endif /* DEBUG */
-
-#ifdef SWIG
-#define S_INOUT(_p_) INOUT
-#define S_OUT(_p_) OUTPUT
-#else /* SWIG */
-#define S_INOUT(_p_) _p_
-#define S_OUT(_p_) _p_
-#endif /* SWIG */
 
 /*============================================================*/
@@ -708,11 +700,5 @@
 #define FD_LIST_INITIALIZER_O( _list_name, _obj ) \
 	{ .next = & _list_name, .prev = & _list_name, .head = & _list_name, .o = _obj }
-#ifdef SWIG
-%apply struct fd_list * OUTPUT { struct fd_list * list };
 void fd_list_init ( struct fd_list * list, void * obj );
-%clear struct fd_list * list;
-#else
-void fd_list_init ( struct fd_list * list, void * obj );
-#endif
 
 /* Return boolean, true if the list is empty */
@@ -793,5 +779,5 @@
  *    ENOMEM 	: Memory allocation for the new object element failed.)
  */
-int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object ** S_OUT(ref) );
+int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object ** ref );
 
 /*
@@ -818,8 +804,8 @@
  *  ENOENT	: No matching object has been found, and result was NULL.
  */
-int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object ** S_OUT(result), int retval );
+int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object ** result, int retval );
 
 /* Special case: get the generic error command object */
-int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object ** S_OUT(obj));
+int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object ** obj);
 
 /*
@@ -839,7 +825,7 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_dict_getval ( struct dict_object * object, void * S_INOUT(val));
-int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * S_OUT(type));
-int fd_dict_getdict ( struct dict_object * object, struct dictionary ** S_OUT(dict));
+int fd_dict_getval ( struct dict_object * object, void * val);
+int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * type);
+int fd_dict_getdict ( struct dict_object * object, struct dictionary ** dict);
 
 /* Debug functions */
@@ -1617,5 +1603,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_sess_handler_create_internal ( struct session_handler ** S_OUT(handler), void (*cleanup)(session_state * state, char * sid) );
+int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)(session_state * state, char * sid) );
 /* Macro to avoid casting everywhere */
 #define fd_sess_handler_create( _handler, _cleanup ) \
@@ -1665,5 +1651,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_sess_new ( struct session ** S_OUT(session), char * diamId, char * opt, size_t optlen );
+int fd_sess_new ( struct session ** session, char * diamId, char * opt, size_t optlen );
 
 /*
@@ -1685,5 +1671,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_sess_fromsid ( char * sid, size_t len, struct session ** S_OUT(session), int * S_OUT(new));
+int fd_sess_fromsid ( char * sid, size_t len, struct session ** session, int * new);
 
 /*
@@ -1704,5 +1690,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_sess_getsid ( struct session * session, char ** S_OUT(sid) );
+int fd_sess_getsid ( struct session * session, char ** sid );
 
 /*
@@ -1805,5 +1791,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** S_OUT(state) ); 
+int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** state ); 
 #define fd_sess_state_retrieve( _handler, _session, _state ) \
 	fd_sess_state_retrieve_internal( (_handler), (_session), (void *)(_state) )
@@ -1825,5 +1811,5 @@
 
 /* Following functions are helpers to create the routing data of a message */
-int  fd_rtd_init(struct rt_data ** S_OUT(rtd));
+int  fd_rtd_init(struct rt_data ** rtd);
 void fd_rtd_free(struct rt_data ** rtd);
 
@@ -1835,5 +1821,5 @@
 
 /* Extract the list of valid candidates, and initialize their scores to 0 */
-void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** S_OUT(candidates), int ini_score);
+void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** candidates, int ini_score);
 
 /* If a peer returned a protocol error for this message, save it so that we don't try to send it there again */
@@ -1949,5 +1935,5 @@
  *    ENOMEM 	: Memory allocation for the new avp failed.)
  */
-int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** S_OUT(avp) );
+int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** avp );
 
 /*
@@ -1968,5 +1954,5 @@
  *    ENOMEM 	: Memory allocation for the new message failed.)
  */
-int fd_msg_new ( struct dict_object * model, int flags, struct msg ** S_OUT(msg) );
+int fd_msg_new ( struct dict_object * model, int flags, struct msg ** msg );
 
 /*
@@ -1989,5 +1975,5 @@
  *  !0      	: an error occurred.
  */
-int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** S_INOUT(msg), int flag );
+int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** msg, int flag );
 
 /*
@@ -2013,5 +1999,5 @@
  *  ENOENT	: No element has been found where requested, and "found" was NULL (otherwise, *found is set to NULL and 0 is returned). 
  */
-int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** S_OUT(found), int * S_INOUT(depth) );
+int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** found, int * depth );
 /* Macro to avoid having to cast the third parameter everywhere */
 #define fd_msg_browse( ref, dir, found, depth )	\
@@ -2057,5 +2043,5 @@
  *  ENOENT	: No AVP has been found, and "avp" was NULL (otherwise, *avp is set to NULL and 0 returned).
  */
-int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** S_OUT(avp) );
+int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** avp );
 
 /*
@@ -2114,5 +2100,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_msg_model ( msg_or_avp * reference, struct dict_object ** S_OUT(model) );
+int fd_msg_model ( msg_or_avp * reference, struct dict_object ** model );
 
 /*
@@ -2130,5 +2116,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_msg_hdr ( struct msg *msg, struct msg_hdr ** S_OUT(pdata) );
+int fd_msg_hdr ( struct msg *msg, struct msg_hdr ** pdata );
 
 /*
@@ -2146,5 +2132,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr ** S_OUT(pdata) );
+int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr ** pdata );
 
 /*
@@ -2167,5 +2153,5 @@
  */
 int fd_msg_answ_associate( struct msg * answer, struct msg * query );
-int fd_msg_answ_getq     ( struct msg * answer, struct msg ** S_OUT(query) );
+int fd_msg_answ_getq     ( struct msg * answer, struct msg ** query );
 int fd_msg_answ_detach   ( struct msg * answer );
 
@@ -2209,5 +2195,5 @@
 int fd_msg_rt_associate( struct msg * msg, struct rt_data ** rtd );
 #endif /* !SWIG */
-int fd_msg_rt_get      ( struct msg * msg, struct rt_data ** S_OUT(rtd) );
+int fd_msg_rt_get      ( struct msg * msg, struct rt_data ** rtd );
 
 /*
@@ -2249,5 +2235,5 @@
 int fd_msg_source_set( struct msg * msg, char * diamid, int add_rr, struct dictionary * dict );
 #endif /* !SWIG */
-int fd_msg_source_get( struct msg * msg, char ** S_OUT(diamid) );
+int fd_msg_source_get( struct msg * msg, char ** diamid );
 
 /*
@@ -2284,5 +2270,5 @@
  * !0 : standard error code.
  */
-int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** S_OUT(session), int * S_OUT(new));
+int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * new);
 
 /***************************************/
@@ -2370,5 +2356,5 @@
  *  ENOMEM	: Unable to allocate enough memory to create the buffer object.
  */
-int fd_msg_bufferize ( struct msg * msg, unsigned char ** S_OUT(buffer), size_t * S_OUT(len) );
+int fd_msg_bufferize ( struct msg * msg, unsigned char ** buffer, size_t * len );
 
 /*
@@ -2392,5 +2378,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** S_OUT(msg) );
+int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** msg );
 
 /* Parsing Error Information structure */
@@ -2426,5 +2412,5 @@
  *  ENOTSUP	: No dictionary definition for the command or one of the mandatory AVP was found.
  */
-int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * S_OUT(error_info) );
+int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * error_info );
 
 /*
@@ -2445,5 +2431,5 @@
  *  ENOMEM	: Unable to allocate enough memory to complete the operation.
  */
-int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * S_OUT(error_info));
+int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * error_info);
 
 
@@ -2624,5 +2610,5 @@
  */
 int fd_disp_register ( int (*cb)( struct msg **, struct avp *, struct session *, enum disp_action *), 
-			enum disp_how how, struct disp_when * when, struct disp_hdl ** S_OUT(handle) );
+			enum disp_how how, struct disp_when * when, struct disp_hdl ** handle );
 
 /*
@@ -2690,5 +2676,5 @@
  *  ENOMEM	: Not enough memory to complete the creation.  
  */
-int fd_fifo_new ( struct fifo ** S_OUT(queue) );
+int fd_fifo_new ( struct fifo ** queue );
 
 /*
@@ -2811,5 +2797,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_fifo_get_int ( struct fifo * queue, void ** S_OUT(item) );
+int fd_fifo_get_int ( struct fifo * queue, void ** item );
 #define fd_fifo_get(queue, item) \
 	fd_fifo_get_int((queue), (void *)(item))
@@ -2831,5 +2817,5 @@
  *  EWOULDBLOCK : The queue was empty.
  */
-int fd_fifo_tryget_int ( struct fifo * queue, void ** S_OUT(item) );
+int fd_fifo_tryget_int ( struct fifo * queue, void ** item );
 #define fd_fifo_tryget(queue, item) \
 	fd_fifo_tryget_int((queue), (void *)(item))
@@ -2853,5 +2839,5 @@
  *  ETIMEDOUT   : The time out has passed and no item has been received.
  */
-int fd_fifo_timedget_int ( struct fifo * queue, void ** S_OUT(item), const struct timespec *abstime );
+int fd_fifo_timedget_int ( struct fifo * queue, void ** item, const struct timespec *abstime );
 #define fd_fifo_timedget(queue, item, abstime) \
 	fd_fifo_timedget_int((queue), (void *)(item), (abstime))
