pike.git/
src/
post_modules/
Nettle/
nettle.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2016-02-16
2016-02-16 13:48:33 by Martin Nilsson <nilsson@fastmail.com>
1ce9e910763c560a35875639c24b8bf7b783a355 (
21
lines) (+
21
/-
0
)
[
Show
|
Annotate
]
Branch:
8.1
Added Nettle.version
19:
#include <nettle/yarrow.h>
+
#ifdef HAVE_NETTLE_VERSION_H
+
#include <nettle/version.h>
+
#endif
+
DECLARATIONS /*! @module Nettle
27:
*! Crypto module instead. */
+
/*! @decl string version()
+
*! Returns the version of the Nettle library, e.g. "3.1". 0 is
+
*! returned when runtime version is unknown.
+
*/
+
PIKEFUN string version()
+
{
+
#ifdef HAVE_NETTLE_VERSION_H
+
push_constant_text("%d.%d");
+
push_int( nettle_version_major() );
+
push_int( nettle_version_minor() );
+
f_sprintf(3);
+
#else
+
push_int(0);
+
#endif
+
}
+
/*! @class Yarrow *! *! Yarrow is a family of pseudo-randomness generators, designed for