diff src/c/urweb.c @ 278:137744c5b1ae

First query example working
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Sep 2008 16:10:07 -0400
parents ed4af33681d8
children fdd7a698be01
line wrap: on
line diff
--- a/src/c/urweb.c	Tue Sep 02 15:29:45 2008 -0400
+++ b/src/c/urweb.c	Tue Sep 02 16:10:07 2008 -0400
@@ -575,3 +575,17 @@
 
   return s;
 }
+
+lw_Basis_string lw_Basis_strdup(lw_context ctx, lw_Basis_string s1) {
+  int len = strlen(s1) + 1;
+  char *s;
+
+  lw_check_heap(ctx, len);
+
+  s = ctx->heap_front;
+
+  strcpy(s, s1);
+  ctx->heap_front += len;
+
+  return s;
+}