summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-01-20 10:40:40 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-01-20 10:40:40 -0500
commit6ec77d7dce5bbc965d0dc44545f3f15d8a9fb181 (patch)
tree8ea100260dd57a167615ea4ec995238f6158cebe /src
parentd6272d8c20892d1ce78c15c8e444916bb150e119 (diff)
Patch from Vladimir Shabanov to support implicit passing of 'time' values from server to client
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c4
-rw-r--r--src/jscomp.sml1
-rw-r--r--src/settings.sml1
3 files changed, 6 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index be13b9e2..382c9d77 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -1773,6 +1773,10 @@ uw_Basis_string uw_Basis_urlifyTime(uw_context ctx, uw_Basis_time t) {
return uw_Basis_urlifyInt(ctx, (uw_Basis_int)t.seconds * 1000000 + t.microseconds);
}
+uw_unit uw_Basis_urlifyTime_w(uw_context ctx, uw_Basis_time t) {
+ return uw_Basis_urlifyInt_w(ctx, (uw_Basis_int)t.seconds * 1000000 + t.microseconds);
+}
+
uw_unit uw_Basis_urlifyString_w(uw_context ctx, uw_Basis_string s) {
if (s[0] == '\0') {
uw_check(ctx, 1);
diff --git a/src/jscomp.sml b/src/jscomp.sml
index dbbb83b2..2c00e04c 100644
--- a/src/jscomp.sml
+++ b/src/jscomp.sml
@@ -311,6 +311,7 @@ fun process file =
| TFfi ("Basis", "string") => ("uu(t[i++])", st)
| TFfi ("Basis", "char") => ("uu(t[i++])", st)
| TFfi ("Basis", "int") => ("parseInt(t[i++])", st)
+ | TFfi ("Basis", "time") => ("parseInt(t[i++])", st)
| TFfi ("Basis", "float") => ("parseFloat(t[i++])", st)
| TFfi ("Basis", "channel") => ("(t[i++].length > 0 ? parseInt(t[i-1]) : null)", st)
diff --git a/src/settings.sml b/src/settings.sml
index 5edb1fde..c5e1f929 100644
--- a/src/settings.sml
+++ b/src/settings.sml
@@ -219,6 +219,7 @@ val jsFuncsBase = basisM [("alert", "alert"),
("substring", "ssub"),
("strcspn", "sspn"),
("kc", "kc"),
+ ("minTime", "0"),
("islower", "isLower"),
("isupper", "isUpper"),