summaryrefslogtreecommitdiff
path: root/random
diff options
context:
space:
mode:
authorDafydd Harries <dafydd.harries@collabora.co.uk>2007-02-05 17:11:00 +0000
committerDafydd Harries <dafydd.harries@collabora.co.uk>2007-02-05 17:11:00 +0000
commit00f0b1e2e799a86bd001602238785292b63bc961 (patch)
treee30e3ead004adc39c1936ba541cedac9f3b8c25a /random
parent91b7d85f2e69ee77769e89229025d801ca6ab814 (diff)
downloadlibnice-00f0b1e2e799a86bd001602238785292b63bc961.tar.gz
nice_rng_glib_new_predictable
darcs-hash:20070205171124-c9803-51fc2431b9eaf7f6b4b61223da4d481f168c9567.gz
Diffstat (limited to 'random')
-rw-r--r--random/random-glib.c10
-rw-r--r--random/random-glib.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/random/random-glib.c b/random/random-glib.c
index ccbb3a5..314fc17 100644
--- a/random/random-glib.c
+++ b/random/random-glib.c
@@ -41,3 +41,13 @@ nice_rng_glib_new (void)
return ret;
}
+NiceRNG *
+nice_rng_glib_new_predictable (void)
+{
+ NiceRNG *rng;
+
+ rng = nice_rng_glib_new ();
+ rng->seed (rng, 0);
+ return rng;
+}
+
diff --git a/random/random-glib.h b/random/random-glib.h
index 5387c05..c6bf995 100644
--- a/random/random-glib.h
+++ b/random/random-glib.h
@@ -11,6 +11,9 @@ G_BEGIN_DECLS
NiceRNG *
nice_rng_glib_new (void);
+NiceRNG *
+nice_rng_glib_new_predictable (void);
+
G_END_DECLS
#endif /* _RANDOM_GLIB_H */