plan9port/src/libString/s_unique.c

17 lines
173 B
C
Raw Normal View History

2003-12-11 18:15:57 +00:00
#include <u.h>
#include <libc.h>
#include "libString.h"
String*
s_unique(String *s)
{
String *p;
if(s->ref > 1){
p = s;
s = s_clone(p);
s_free(p);
}
return s;
}