summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gdhelpers.h
blob: 5b27638783b8a88d8a341792bd99b5717974ead8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef GDHELPERS_H 
#define GDHELPERS_H 1

#include <sys/types.h>

/* TBB: strtok_r is not universal; provide an implementation of it. */

extern char *gd_strtok_r(char *s, char *sep, char **state);

/* These functions wrap memory management. gdFree is
	in gd.h, where callers can utilize it to correctly
	free memory allocated by these functions with the
	right version of free(). */
void *gdCalloc(size_t nmemb, size_t size);
void *gdMalloc(size_t size);
void *gdRealloc(void *ptr, size_t size);
char *gdEstrdup(const char *ptr);

#endif /* GDHELPERS_H */