diff options
author | Anders Svensson <[email protected]> | 2014-03-24 17:33:02 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2014-03-25 15:05:28 +0100 |
commit | d1ceb909e8867b4dfd97130270ef16201cc3e27b (patch) | |
tree | ff5b94a08cafc5c4f649fe092c0d1713a6732cdc /lib/diameter/src/compiler/diameter_forms.hrl | |
parent | 2aa88958de6b07f35eea5e26a65adb69619daa7b (diff) | |
download | otp-d1ceb909e8867b4dfd97130270ef16201cc3e27b.tar.gz otp-d1ceb909e8867b4dfd97130270ef16201cc3e27b.tar.bz2 otp-d1ceb909e8867b4dfd97130270ef16201cc3e27b.zip |
Use fun encoding to erl_parse:abstract/2
This is an encoding that didn't exist at the time of the previous
commit, but which was added in commit 83b6daef. Use it to restrict
stringification to lists containing printable ascii.
Diffstat (limited to 'lib/diameter/src/compiler/diameter_forms.hrl')
-rw-r--r-- | lib/diameter/src/compiler/diameter_forms.hrl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/diameter/src/compiler/diameter_forms.hrl b/lib/diameter/src/compiler/diameter_forms.hrl index da680666f0..dd03401b9e 100644 --- a/lib/diameter/src/compiler/diameter_forms.hrl +++ b/lib/diameter/src/compiler/diameter_forms.hrl @@ -57,4 +57,6 @@ -define(FIELDS(Fs), [{?record_field, ?ATOM(F), V} || {F,V} <- Fs]). %% Literal term. --define(TERM(T), erl_parse:abstract(T, [{line, ?LINE}, {encoding, latin1}])). +-define(TERM(T), erl_parse:abstract(T, [ + {line, ?LINE}, + {encoding, fun diameter_codegen:is_printable_ascii/1}])). |