Module: sems Branch: master Commit: 61ed19a2b7e0c5eccfd918bd1078932356e656ea URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=61ed19a2b7e0c5eccfd918bd1078932356e656ea
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Wed Mar 6 17:16:32 2013 +0100 AmArg: added support for long int --- core/AmArg.h | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/AmArg.h b/core/AmArg.h index 10e516b..760d450 100644 --- a/core/AmArg.h +++ b/core/AmArg.h @@ -116,7 +116,7 @@ class AmArg // value union { - int v_int; + long int v_int; bool v_bool; double v_double; const char* v_cstr; @@ -142,6 +142,11 @@ class AmArg v_int(v) { } + AmArg(const long int& v) + : type(Int), + v_int(v) + { } + AmArg(const bool& v) : type(Bool), v_bool(v) @@ -250,7 +255,8 @@ class AmArg v_obj = v; } - int asInt() const { return v_int; } + int asInt() const { return (int)v_int; } + long int asLong() const { return v_int; } int asBool() const { return v_bool; } double asDouble() const { return v_double; } const char* asCStr() const { return v_cstr; } _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
