Gregory (Grisha) Trubetskoy wrote:
>
> On Tue, 23 May 2006, Jelmer Vernooij wrote:
>
>>> This is subversion 1.3.1.
>>>
>>> subversion/libsvn_ra_dav/commit.c:1339
>>>
>>> /* Use the client callback to create a tmpfile. */
>>> SVN_ERR(file->cc->ras->callbacks->open_tmp_file
>>> (&baton->tmpfile,
>>> file->cc->ras->callback_baton,
>>> file->pool));
>>>
>>> ...because file->cc->ras->callbacks->open_tmp_file is null, unless
>>> you set it
>>> to something.
>>>
>>> But can you set it from python? I tried (based on a comment I saw in
>>> swig
>>> bindings somewhere):
>> At the moment, you can't, indeed. I've got a half finished patch that
>> implements this, but I haven't bothered to finish it yet. I'll try to
>
> If you could share the patch, that'd be great. Getting the 'ra' to work
> in Python would be fantastic and I'll be happy to help with whatever I can.
>
> BTW, the above code could also be classified as a bug - it should test
> callbacks->open_tmp_file before calling it and not assume that it's
> there.
Actually, no, it's not a bug.
It's a bug for anyone to create an instance of a struct, and not fully
initialize it before first use. NULL is not a valid initializer unless
explicitly stated to be so in the documentation.
Max.
Received on Wed May 24 19:44:47 2006