Merge commit 'v3.3.1' into try-3.3.1
[debian/gnuradio] / gruel / src / include / gruel / pmt.h
index c371b023b539b79ec257133efe28bb36b6e837c5..514b24d8b0f26b6a44aa2f24f6b3b7267f1af557 100644 (file)
@@ -163,6 +163,27 @@ pmt_t pmt_from_long(long x);
  */
 long pmt_to_long(pmt_t x);
 
+/*
+ * ------------------------------------------------------------------------
+ *                            uint64_t
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if \p x is an uint64 number, else false
+bool pmt_is_uint64(pmt_t x);
+
+//! Return the pmt value that represents the uint64 \p x.
+pmt_t pmt_from_uint64(uint64_t x);
+
+/*!
+ * \brief Convert pmt to uint64 if possible.
+ *
+ * When \p x represents an exact integer that fits in a uint64,
+ * return that uint64.  Else raise an exception, either wrong_type
+ * when x is not an exact uint64, or out_of_range when it doesn't fit.
+ */
+uint64_t pmt_to_uint64(pmt_t x);
+
 /*
  * ------------------------------------------------------------------------
  *                             Reals