diff options
author | Adam Sampson <ats@offog.org> | 2013-07-16 14:17:18 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-07-17 21:38:49 +0200 |
commit | bef38b98c0536d81c0e4b2e78a9182e1df1d451c (patch) | |
tree | 74e819723504b4a54f3af85963703992f92b1035 /tests/resume-dtls.c | |
parent | 65d19ef39b03d23b171d5546e062e7c846264aa4 (diff) | |
download | gnutls-bef38b98c0536d81c0e4b2e78a9182e1df1d451c.tar.gz |
Avoid depending on hash order in gdoc.
Previously, gdoc had a hash of regexp replacements for each output
format, and applied the replacements in the order that "keys" returned
for the hash. However, not all orders are safe -- and now that Perl 5.18
randomises hash order per-process, it only worked sometimes!
For example, this order is OK:
'is a #gnutls_session_t structure.'
'\@([A-Za-z0-9_]+)\s*' -> 'is a #gnutls_session_t structure.'
'\%([A-Za-z0-9_]+)' -> 'is a #gnutls_session_t structure.'
'\#([A-Za-z0-9_]+)' -> 'is a @code{gnutls_session_t} structure.'
'([A-Za-z0-9_]+\(\))' -> 'is a @code{gnutls_session_t} structure.'
This one, however, winds up producing invalid texinfo:
'is a #gnutls_session_t structure.'
'\%([A-Za-z0-9_]+)' -> 'is a #gnutls_session_t structure.'
'([A-Za-z0-9_]+\(\))' -> 'is a #gnutls_session_t structure.'
'\#([A-Za-z0-9_]+)' -> 'is a @code{gnutls_session_t} structure.'
'\@([A-Za-z0-9_]+)\s*' -> 'is a @code{code} {gnutls_session_t} structure.'
This patch turns the hash into a list, so the replacements will always
be done in the intended order.
Signed-off-by: Adam Sampson <ats@offog.org>
Diffstat (limited to 'tests/resume-dtls.c')
0 files changed, 0 insertions, 0 deletions