You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/03/09 01:48:36 UTC

[24/50] git commit: lua: detect more integral types

lua: detect more integral types


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/0738c1b6
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/0738c1b6
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/0738c1b6

Branch: refs/heads/3.3.x
Commit: 0738c1b6d8b91f283faf23a0a89ce1c3e3b8eb47
Parents: 1e90801
Author: James Peach <jp...@apache.org>
Authored: Thu Feb 28 16:30:05 2013 -0800
Committer: James Peach <jp...@apache.org>
Committed: Thu Feb 28 16:31:32 2013 -0800

----------------------------------------------------------------------
 plugins/experimental/lua/state.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0738c1b6/plugins/experimental/lua/state.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/lua/state.cc b/plugins/experimental/lua/state.cc
index 9d89a97..a40ce51 100644
--- a/plugins/experimental/lua/state.cc
+++ b/plugins/experimental/lua/state.cc
@@ -69,6 +69,11 @@ template <typename T> struct is_integral_type<T *> {
   enum { value = 1, is_pointer = 1 };
 };
 
+template <> struct is_integral_type<int> { enum { value = 1, is_pointer = 0 }; };
+template <> struct is_integral_type<unsigned> { enum { value = 1, is_pointer = 0 }; };
+template <> struct is_integral_type<long> { enum { value = 1, is_pointer = 0 }; };
+template <> struct is_integral_type<unsigned long> { enum { value = 1, is_pointer = 0 }; };
+
 static unsigned
 nproc()
 {