Commits

Pierre Joye committed fa5cf20

don't use gd private alloc/free function in tests (or anywhere else)

  • Participants
  • Parent commits 99a338b

Comments (0)

Files changed (9)

File tests/gdimagefilledpolygon/gdimagefilledpolygon1.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[0].y = 10;
 	gdImageFilledPolygon(im, points, 1, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimagefilledpolygon/gdimagefilledpolygon1.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;

File tests/gdimagefilledpolygon/gdimagefilledpolygon2.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[1].y = 70;
 	gdImageFilledPolygon(im, points, 2, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimagefilledpolygon/gdimagefilledpolygon2.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;

File tests/gdimagefilledpolygon/gdimagefilledpolygon3.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[2].y = 30;
 	gdImageFilledPolygon(im, points, 3, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimagefilledpolygon/gdimagefilledpolygon3.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;

File tests/gdimageopenpolygon/gdimageopenpolygon1.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[0].y = 10;
 	gdImageOpenPolygon(im, points, 1, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimageopenpolygon/gdimageopenpolygon1.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;

File tests/gdimageopenpolygon/gdimageopenpolygon2.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[1].y = 70;
 	gdImageOpenPolygon(im, points, 2, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimageopenpolygon/gdimageopenpolygon2.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;

File tests/gdimageopenpolygon/gdimageopenpolygon3.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[2].y = 30;
 	gdImageOpenPolygon(im, points, 3, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimageopenpolygon/gdimageopenpolygon3.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;

File tests/gdimagepolygon/gdimagepolygon1.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[0].y = 10;
 	gdImagePolygon(im, points, 1, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimagepolygon/gdimagepolygon1.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;

File tests/gdimagepolygon/gdimagepolygon2.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[1].y = 70;
 	gdImagePolygon(im, points, 2, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimagepolygon/gdimagepolygon2.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;

File tests/gdimagepolygon/gdimagepolygon3.c

 	white = gdImageColorAllocate(im, 0xff, 0xff, 0xff);
 	black = gdImageColorAllocate(im, 0, 0, 0);
 	gdImageFilledRectangle(im, 0, 0, 99, 99, white);
-	points = (gdPointPtr)gdCalloc(3, sizeof(gdPoint));
+	points = (gdPointPtr)calloc(3, sizeof(gdPoint));
 	if (!points) {
 		gdImageDestroy(im);
 		exit(EXIT_FAILURE);
 	points[2].y = 30;
 	gdImagePolygon(im, points, 3, black);
 	r = gdAssertImageEqualsToFile(GDTEST_TOP_DIR "/gdimagepolygon/gdimagepolygon3.png", im);
-	gdFree(points);
+	free(points);
 	gdImageDestroy(im);
 	if (!r) exit(EXIT_FAILURE);
 	return EXIT_SUCCESS;