[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.50,2.51
Sjoerd Mullender
sjoerd@oratrix.nl
Thu, 07 Sep 2000 12:40:28 +0200
This doesn't work. Neither m nor d are initialized at this point.
On Wed, Sep 6 2000 Guido van Rossum wrote:
> Update of /cvsroot/python/python/dist/src/Modules
> In directory slayer.i.sourceforge.net:/tmp/cvs-serv9746
>
> Modified Files:
> cPickle.c
> Log Message:
> Simple fix from Jin Fulton to avoid returning a half-initialized
> module when e.g. copy_reg.py doesn't exist. This caused a core dump.
>
> This closes SF bug 112944.
>
>
> Index: cPickle.c
> ===================================================================
> RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
> retrieving revision 2.50
> retrieving revision 2.51
> diff -C2 -r2.50 -r2.51
> *** cPickle.c 2000/08/12 20:58:11 2.50
> --- cPickle.c 2000/09/07 00:11:40 2.51
> ***************
> *** 4522,4525 ****
> --- 4522,4527 ----
> PyObject *compatible_formats;
>
> + if (init_stuff(m, d) < 0) return;
> +
> Picklertype.ob_type = &PyType_Type;
> Unpicklertype.ob_type = &PyType_Type;
> ***************
> *** 4543,4547 ****
> Py_XDECREF(format_version);
> Py_XDECREF(compatible_formats);
> -
> - init_stuff(m, d);
> }
> --- 4545,4547 ----
>
>
-- Sjoerd Mullender <sjoerd.mullender@oratrix.com>