[Nickle] nickle: Branch 'master'
Bart Massey
bart at keithp.com
Fri Sep 5 22:18:20 PDT 2008
string.5c | 10 ++++++++++
value.h | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 9a1ad39e7b3207925a807c27401450bd47d555d0
Author: Bart Massey <bart at cs.pdx.edu>
Date: Fri Sep 5 22:18:08 2008 -0700
added string reverse()
diff --git a/string.5c b/string.5c
index 8f9af18..835dad9 100644
--- a/string.5c
+++ b/string.5c
@@ -252,4 +252,14 @@ extend namespace String {
(quote_context) { .oq = "\"", .cq = "\"", .qq = "\""}
);
+ public string reverse(string s)
+ /*
+ * Reverse the string s
+ */
+ {
+ int ns = length(s);
+ int[ns] t = { [i] = s[ns - i - 1] };
+ return String::new(t);
+ }
+
}
diff --git a/value.h b/value.h
index 98c5845..cfdc64e 100644
--- a/value.h
+++ b/value.h
@@ -972,7 +972,7 @@ Value NewForeign (const char *id, void *data, void (*mark)(void *data), void (*f
unsigned FpartLength (Fpart *a);
-#define DEFAULT_FLOAT_PREC 256
+#define DEFAULT_FLOAT_PREC 4096
#define REF_CACHE_SIZE 1031
extern DataCachePtr refCache;
More information about the Nickle
mailing list