xmlbuff.c 296 B

1234567891011121314
  1. #include <stdlib.h>
  2. #include "xmlbuff.h"
  3. XMLBuff *XMLBuffNew(char *data, const char *name, int size) {
  4. XMLBuff *out = malloc(sizeof(XMLBuff));
  5. if (!out) return NULL;
  6. *out = (XMLBuff){ .data=data, .name=name, .size=size };
  7. return out;
  8. }
  9. void XMLBuffFree(XMLBuff *in) {
  10. if (in) free(in);
  11. }