+////////////////////////////////////////////////////////////////////////////
+// Uint64
+////////////////////////////////////////////////////////////////////////////
+
+pmt_uint64::pmt_uint64(uint64_t value) : d_value(value) {}
+
+bool
+pmt_is_uint64(pmt_t x)
+{
+ return x->is_uint64();
+}
+
+
+pmt_t
+pmt_from_uint64(uint64_t x)
+{
+ return pmt_t(new pmt_uint64(x));
+}
+
+uint64_t
+pmt_to_uint64(pmt_t x)
+{
+ if(x->is_uint64())
+ return _uint64(x)->value();
+ if(x->is_integer())
+ {
+ long tmp = _integer(x)->value();
+ if(tmp >= 0)
+ return (uint64_t) tmp;
+ }
+
+ throw pmt_wrong_type("pmt_to_uint64", x);
+}
+