1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## ruby-typemap-digest by <zippel@linux-m68k.org>
4
## DP: Change the ruby 'digest' typemaps to tolerate NULL pointers.
5
## DP: This may be the bug which has sporadically plagued us for
6
## DP: several months, most recently on m68k. Patch by Roman Zippel.
8
## DP: Sent upstream: http://svn.haxx.se/dev/archive-2006-09/0536.shtml
1
From: Roman Zippel <zippel@linux-m68k.org>
2
Date: Mon, 18 Sep 2006 01:05:02 +0200
3
Subject: Change the ruby 'digest' typemaps to tolerate NULL pointers.
5
Bug #387996: I looked at the failing self tests [on m68k]. The first
6
one is a bug in the created wrapper. The basic problem is that in
7
svn_delta.c:_wrap_svn_txdelta_apply_wrapper() the value of temp3 is not
8
modified by svn_txdelta_apply_wrapper(), so the return is basically
9
random. In this case the stack is clear and svn_md5_digest_to_cstring()
10
returns a NULL, which rb_str_new2() doesn't like.
12
The easiest fix is to change the typemap in svn_types.swg so it can deal
13
with the NULL pointer. (BTW I tried returning Qnil here, but that
14
doesn't work well output_helper.)
16
Sent upstream: http://svn.haxx.se/dev/archive-2006-09/0536.shtml
11
18
--- a/subversion/bindings/swig/include/svn_types.swg
12
19
+++ b/subversion/bindings/swig/include/svn_types.swg
15
22
%typemap(argout) unsigned char digest[ANY] {
16
23
char *digest_string = (char *)svn_md5_digest_to_cstring($1, _global_pool);