Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove compiler warnings

  • Loading branch information...
commit 17b1ebe03767fcc669d97d7c713d6eba807282a0 1 parent 8052e8c
@mgdm mgdm authored
Showing with 8 additions and 3 deletions.
  1. +6 −1 cairo.c
  2. +2 −2 cairo_image_surface.c
View
7 cairo.c
@@ -24,6 +24,11 @@
#include "config.h"
#endif
+#if defined(CAIRO_HAS_FT_FONT) && defined(HAVE_FREETYPE)
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#endif
+
#include "php.h"
#include "ext/standard/info.h"
#include "php_cairo.h"
@@ -42,7 +47,7 @@ PHP_GINIT_FUNCTION(cairo)
PHP_GSHUTDOWN_FUNCTION(cairo)
{
if (cairo_globals->ft_lib != NULL) {
- FT_Done_Library(cairo_globals->ft_lib);
+ FT_Done_FreeType(cairo_globals->ft_lib);
}
}
View
4 cairo_image_surface.c
@@ -427,7 +427,7 @@ PHP_FUNCTION(cairo_image_surface_create_from_png)
#endif
surface_object->closure = closure;
- surface_object->surface = cairo_image_surface_create_from_png_stream(php_cairo_read_func,(void *)closure);
+ surface_object->surface = cairo_image_surface_create_from_png_stream((cairo_read_func_t) php_cairo_read_func, (void *)closure);
php_cairo_trigger_error(cairo_surface_status(surface_object->surface) TSRMLS_CC);
}
/* }}} */
@@ -475,7 +475,7 @@ PHP_METHOD(CairoImageSurface, createFromPng)
#endif
surface_object->closure = closure;
- surface_object->surface = cairo_image_surface_create_from_png_stream(php_cairo_read_func,(void *)closure);
+ surface_object->surface = cairo_image_surface_create_from_png_stream((cairo_read_func_t) php_cairo_read_func, (void *)closure);
PHP_CAIRO_ERROR(cairo_surface_status(surface_object->surface));
}
/* }}} */
Please sign in to comment.
Something went wrong with that request. Please try again.