]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libc/port/runestrdup.c
libregexp: improve the transition to next available thread, instruction, and generation
[plan9front.git] / sys / src / libc / port / runestrdup.c
1 #include <u.h>
2 #include <libc.h>
3
4 Rune*
5 runestrdup(Rune *s)
6 {
7         Rune *ns;
8
9         ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
10         if(ns == 0)
11                 return 0;
12         setmalloctag(ns, getcallerpc(&s));
13         return runestrcpy(ns, s);
14 }