PYTHON-3728 Simplify convert_codec_options signature (#1225)
This commit is contained in:
parent
7146be01ae
commit
0bce579b81
@ -599,8 +599,7 @@ fail:
|
||||
* Return 1 on success. options->document_class is a new reference.
|
||||
* Return 0 on failure.
|
||||
*/
|
||||
int convert_codec_options(PyObject* self, PyObject* options_obj, void* p) {
|
||||
codec_options_t* options = (codec_options_t*)p;
|
||||
int convert_codec_options(PyObject* self, PyObject* options_obj, codec_options_t* options) {
|
||||
PyObject* type_registry_obj = NULL;
|
||||
long type_marker;
|
||||
|
||||
@ -613,8 +612,9 @@ int convert_codec_options(PyObject* self, PyObject* options_obj, void* p) {
|
||||
&options->unicode_decode_error_handler,
|
||||
&options->tzinfo,
|
||||
&type_registry_obj,
|
||||
&options->datetime_conversion))
|
||||
&options->datetime_conversion)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
type_marker = _type_marker(options->document_class,
|
||||
GETSTATE(self)->_type_marker_str);
|
||||
|
||||
@ -93,7 +93,7 @@ typedef struct codec_options_t {
|
||||
|
||||
#define _cbson_convert_codec_options_INDEX 4
|
||||
#define _cbson_convert_codec_options_RETURN int
|
||||
#define _cbson_convert_codec_options_PROTO (PyObject* self, PyObject* options_obj, void* p)
|
||||
#define _cbson_convert_codec_options_PROTO (PyObject* self, PyObject* options_obj, codec_options_t* options)
|
||||
|
||||
#define _cbson_destroy_codec_options_INDEX 5
|
||||
#define _cbson_destroy_codec_options_RETURN void
|
||||
|
||||
Loading…
Reference in New Issue
Block a user