12 lines
178 B
C
12 lines
178 B
C
#ifndef CLONESTR_H_
|
|
#define CLONESTR_H_
|
|
|
|
#define clonestr(str) \
|
|
({ \
|
|
char *__p = malloc(strlen((str))+1); \
|
|
strcpy(__p, (str)); \
|
|
(__p); \
|
|
})
|
|
|
|
#endif // CLONESTR_H_
|