defined why2_strdup
I hope I won't fuck up anything by this
This commit is contained in:
parent
d5ae68c621
commit
0b4ca30ec9
@ -7,9 +7,7 @@
|
|||||||
#include <why2/memory.h>
|
#include <why2/memory.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <why2/flags.h>
|
|
||||||
|
|
||||||
//LOCAL
|
//LOCAL
|
||||||
typedef struct node
|
typedef struct node
|
||||||
@ -107,6 +105,15 @@ void *why2_realloc(void *pointer, unsigned long size)
|
|||||||
return allocated;
|
return allocated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *why2_strdup(char *string)
|
||||||
|
{
|
||||||
|
char *allocated = strdup(string);
|
||||||
|
|
||||||
|
push_to_list(allocated);
|
||||||
|
|
||||||
|
return allocated;
|
||||||
|
}
|
||||||
|
|
||||||
void why2_free(void *pointer)
|
void why2_free(void *pointer)
|
||||||
{
|
{
|
||||||
//VARIABLES
|
//VARIABLES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user