[seed] [mpfr] Added mpfr.get_version and get_patches



commit 9dbc65f301ad4fb32ff86ad0746243fe4bb04f1a
Author: Matt ARSENAULT <arsenm2 rpi edu>
Date:   Sun Jul 5 21:19:03 2009 -0400

    [mpfr] Added mpfr.get_version and get_patches

 modules/mpfr/seed-mpfr.c |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/modules/mpfr/seed-mpfr.c b/modules/mpfr/seed-mpfr.c
index 571ab8c..2ee71d5 100644
--- a/modules/mpfr/seed-mpfr.c
+++ b/modules/mpfr/seed-mpfr.c
@@ -669,8 +669,46 @@ seed_mpfr_construct(SeedContext ctx,
     return seed_make_object(ctx, mpfr_class, newmp);
 }
 
+SeedValue seed_mpfr_get_version (SeedContext ctx,
+                                 SeedObject function,
+                                 SeedObject this_object,
+                                 gsize argument_count,
+                                 const SeedValue args[],
+                                 SeedException * exception)
+{
+    const gchar* str;
+    SeedValue ret;
+
+    CHECK_ARG_COUNT("mpfr.get_version", 0);
+
+    str = mpfr_get_version();
+    ret = seed_value_from_string(ctx, str, exception);
+
+    return ret;
+}
+
+SeedValue seed_mpfr_get_patches (SeedContext ctx,
+                                 SeedObject function,
+                                 SeedObject this_object,
+                                 gsize argument_count,
+                                 const SeedValue args[],
+                                 SeedException * exception)
+{
+    const gchar* str;
+    SeedValue ret;
+
+    CHECK_ARG_COUNT("mpfr.get_patches", 0);
+
+    str = mpfr_get_patches();
+    ret = seed_value_from_string(ctx, str, exception);
+
+    return ret;
+}
+
 seed_static_function mpfr_funcs[] =
 {
+    {"get_version", seed_mpfr_get_version, 0},
+    {"get_patches", seed_mpfr_get_patches, 0},
     {"add", seed_mpfr_add, 0},
     {"sqrt", seed_mpfr_sqrt, 0},
     {"rec_sqrt", seed_mpfr_rec_sqrt, 0},



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]