Skip to content
Permalink
3471efde50
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
33 lines (24 sloc) 607 Bytes
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#define MAXSEG 5
#define DYNARR_TYPE int
#define TYPED_NAME( name ) TOKEN_PASTE(DYNARR_TYPE, name)
#include "dynarr.h"
typedef struct TYPED_NAME(DynArr) IdArr;
#define DYNARR_TYPE float
#define TYPED_NAME( name ) TOKEN_PASTE(DYNARR_TYPE, name)
#include "dynarr.h"
typedef struct TYPED_NAME(DynArr) ValueArr;
int main(int argc, char** argv){
MEM_LEAK_CATCH();
IdArr *p1;
ValueArr *p2;
p1 = (IdArr*)malloc(sizeof(IdArr));
p2 = (ValueArr*)malloc(sizeof(ValueArr));
// done
FREE_SAFE(p1);
FREE_SAFE(p2);
MEM_LEAK_SHOW();
return 0;
}