diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-12-08 11:50:00 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-12-08 11:50:00 +0100 |
commit | 7ad37a2220e160f0a209b75d6c8ddc7ac3d08c3a (patch) | |
tree | c78e3998b7235f95a143f21a8fb3e0c69dac56b7 | |
parent | b5936ba8a6ee6aeff3cf69b769b328d9dc2fe911 (diff) |
allow pointcode2int() for a pointcode that's already in integer format
this simplifies the callers...
-rw-r--r-- | src/osmo_util.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/osmo_util.erl b/src/osmo_util.erl index ed6dfad..3c12952 100644 --- a/src/osmo_util.erl +++ b/src/osmo_util.erl @@ -143,6 +143,8 @@ make_prim(Subsys, GenName, SpecName, Param) -> spec_name = SpecName, parameters = Param}. % parse a 3-tuple pointcode into a raw integer +pointcode2int(Int) when is_integer(Int) -> + Int; pointcode2int(#pointcode{repr=Type, value=Value}) -> pointcode2int(Type, Value); pointcode2int({Std, Param}) -> |