@@ -106,13 +106,13 @@ int
106106context_set_resolution_type (getdns_context  * context , PyObject  * py_value )
107107{
108108    getdns_return_t  ret ;
109-     uint64_t  value ;
109+     getdns_resolution_t  value ;
110110
111111    if  (!PyInt_Check (py_value ))  {
112112        PyErr_SetString (PyExc_AttributeError , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
113113        return  -1 ;
114114    }
115-     if  ((long )(value  =  PyInt_AsLong (py_value )) <  0 )  {
115+     if  ((long long  )(value  =  ( getdns_resolution_t ) PyInt_AsLong (py_value )) <  0 )  {
116116        PyErr_SetString (PyExc_AttributeError , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
117117        return  -1 ;
118118    }
@@ -134,13 +134,13 @@ int
134134context_set_dns_transport (getdns_context  * context , PyObject  * py_value )
135135{
136136    getdns_return_t  ret ;
137-     uint64_t  value ;
137+     getdns_transport_t  value ;
138138
139139    if  (!PyInt_Check (py_value ))  {
140140        PyErr_SetString (PyExc_AttributeError , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
141141        return  -1 ;
142142    }
143-     if  ((long )(value  =  PyInt_AsLong (py_value )) <  0 )  {
143+     if  ((long long  )(value  =  ( getdns_transport_t ) PyInt_AsLong (py_value )) <  0 )  {
144144        PyErr_SetString (PyExc_AttributeError , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
145145        return  -1 ;
146146    }
@@ -296,7 +296,7 @@ context_set_dnssec_allowed_skew(getdns_context *context, PyObject *py_value)
296296        PyErr_SetString (PyExc_AttributeError , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
297297        return  -1 ;
298298    }
299-     if  ((long )(value  =  PyInt_AsLong (py_value )) <  0 )  {
299+     if  ((long )(value  =  ( uint32_t ) PyInt_AsLong (py_value )) <  0 )  {
300300        PyErr_SetString (PyExc_AttributeError , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
301301        return  -1 ;
302302    }
314314context_set_edns_maximum_udp_payload_size (getdns_context  * context , PyObject  * py_value )
315315{
316316    getdns_return_t  ret ;
317-     uint32_t  value ;
317+     uint16_t  value ;
318318
319319    if  (!PyInt_Check (py_value ))  {
320320        PyErr_SetString (PyExc_AttributeError , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
@@ -937,21 +937,21 @@ context_general(getdns_ContextObject *self, PyObject *args, PyObject *keywds)
937937    uint16_t   request_type ;
938938    PyDictObject  * extensions_obj  =  0 ;
939939    void  * userarg ;
940-     long  tid  =  0 ;
940+     getdns_transaction_t  tid  =  0 ;
941941    char  * callback  =  0 ;
942942    PyObject  * resp ;
943943
944944    if  ((context  =  PyCapsule_GetPointer (self -> py_context , "context" )) ==  NULL )  {
945945        PyErr_SetString (getdns_error , GETDNS_RETURN_GENERIC_ERROR_TEXT );
946946        return  NULL ;
947947    }
948-     if  (!PyArg_ParseTupleAndKeywords (args , keywds , "sH|Osls " , kwlist ,
948+     if  (!PyArg_ParseTupleAndKeywords (args , keywds , "sH|OsLs " , kwlist ,
949949                                     & name , & request_type ,
950950                                     & extensions_obj , & userarg , & tid , & callback ))  {
951951        return  NULL ;
952952    }
953953    if  ((resp  =  do_query (self -> py_context , name , request_type , extensions_obj , userarg ,
954-                            ( long ) tid , callback )) ==  0 )  {
954+                            tid , callback )) ==  0 )  {
955955        PyObject  * err_type , * err_value , * err_traceback ;
956956        PyErr_Fetch (& err_type , & err_value , & err_traceback );
957957        PyErr_Restore (err_type , err_value , err_traceback );
@@ -976,15 +976,15 @@ context_address(getdns_ContextObject *self, PyObject *args, PyObject *keywds)
976976    char  * name ;
977977    PyDictObject  * extensions_obj  =  0 ;
978978    void  * userarg ;
979-     long  tid ;
979+     getdns_transaction_t  tid ;
980980    char  * callback  =  0 ;
981981    PyObject  * resp ;
982982
983983    if  ((context  =  PyCapsule_GetPointer (self -> py_context , "context" )) ==  NULL )  {
984984        PyErr_SetString (getdns_error , GETDNS_RETURN_GENERIC_ERROR_TEXT );
985985        return  NULL ;
986986    }
987-     if  (!PyArg_ParseTupleAndKeywords (args , keywds , "s|OsHs " , kwlist ,
987+     if  (!PyArg_ParseTupleAndKeywords (args , keywds , "s|OsLs " , kwlist ,
988988                                     & name , 
989989                                     & extensions_obj , & userarg , & tid , & callback ))  {
990990        PyErr_SetString (getdns_error , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
@@ -1014,7 +1014,7 @@ context_hostname(getdns_ContextObject *self, PyObject *args, PyObject *keywds)
10141014    void  * address ;
10151015    PyDictObject  * extensions_obj  =  0 ;
10161016    void  * userarg ;
1017-     long  tid ;
1017+     getdns_transaction_t  tid ;
10181018    char  *  callback  =  0 ;
10191019    PyObject  * resp ;
10201020    getdns_context  * context ;
@@ -1023,7 +1023,7 @@ context_hostname(getdns_ContextObject *self, PyObject *args, PyObject *keywds)
10231023        PyErr_SetString (getdns_error , GETDNS_RETURN_GENERIC_ERROR_TEXT );
10241024        return  NULL ;
10251025    }
1026-     if  (!PyArg_ParseTupleAndKeywords (args , keywds , "O|Osls " , kwlist ,
1026+     if  (!PyArg_ParseTupleAndKeywords (args , keywds , "O|OsLs " , kwlist ,
10271027                                     & address , 
10281028                                     & extensions_obj , & userarg , & tid , & callback ))  {
10291029        PyErr_SetString (getdns_error , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
@@ -1054,7 +1054,7 @@ context_service(getdns_ContextObject *self, PyObject *args, PyObject *keywds)
10541054    char  * name ;
10551055    PyDictObject  * extensions_obj  =  0 ;
10561056    void  * userarg ;
1057-     long  tid ;
1057+     getdns_transaction_t  tid ;
10581058    char  * callback  =  0 ;
10591059    PyObject  * resp ;
10601060    getdns_context  * context ;
@@ -1063,7 +1063,7 @@ context_service(getdns_ContextObject *self, PyObject *args, PyObject *keywds)
10631063        PyErr_SetString (getdns_error , GETDNS_RETURN_GENERIC_ERROR_TEXT );
10641064        return  NULL ;
10651065    }
1066-     if  (!PyArg_ParseTupleAndKeywords (args , keywds , "s|Osls " , kwlist ,
1066+     if  (!PyArg_ParseTupleAndKeywords (args , keywds , "s|OsLs " , kwlist ,
10671067                                     & name , 
10681068                                     & extensions_obj , & userarg , & tid , & callback ))  {
10691069        PyErr_SetString (getdns_error , GETDNS_RETURN_INVALID_PARAMETER_TEXT );
0 commit comments