From 510d7811d69b79069cf7e9b3d60550dc8aa62a33 Mon Sep 17 00:00:00 2001 From: dreamsxin Date: Wed, 31 Jul 2013 16:53:30 +0800 Subject: [PATCH] Fix image bug --- ext/config.m4 | 7 +++++-- ext/image.c | 2 +- ext/phalcon.c | 2 ++ ext/phalcon.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ext/config.m4 b/ext/config.m4 index c27815966ff..a905d9be033 100644 --- a/ext/config.m4 +++ b/ext/config.m4 @@ -340,8 +340,11 @@ mvc/model/query/scanner.c \ mvc/view/engine/volt/parser.c \ mvc/view/engine/volt/scanner.c \ annotations/parser.c \ -annotations/scanner.c \ -image.c" +annotations/scanner.c +image.c \ +image/adapterinterface.c \ +image/exception.c \ +image/adapter/gd.c" PHP_NEW_EXTENSION(phalcon, $phalcon_sources, $ext_shared) PHP_ADD_EXTENSION_DEP([phalcon], [spl]) diff --git a/ext/image.c b/ext/image.c index 5429cea1f0a..093a215497d 100644 --- a/ext/image.c +++ b/ext/image.c @@ -50,7 +50,7 @@ */ PHALCON_INIT_CLASS(Phalcon_Image){ - PHALCON_REGISTER_CLASS(Phalcon, Logger, logger, NULL, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); + PHALCON_REGISTER_CLASS(Phalcon, Image, image, NULL, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); // Resizing constraints zend_declare_class_constant_long(phalcon_image_ce, SL("NONE"), 1 TSRMLS_CC); diff --git a/ext/phalcon.c b/ext/phalcon.c index 0e0ffed316a..9356331c081 100644 --- a/ext/phalcon.c +++ b/ext/phalcon.c @@ -714,6 +714,8 @@ static PHP_MINIT_FUNCTION(phalcon){ PHALCON_INIT(Phalcon_Events_Manager); PHALCON_INIT(Phalcon_Events_Exception); PHALCON_INIT(Phalcon_Image); + PHALCON_INIT(Phalcon_Image_AdapterInterface); + PHALCON_INIT(Phalcon_Image_Adapter_GD); old_error_cb = zend_error_cb; zend_error_cb = phalcon_error_cb; diff --git a/ext/phalcon.h b/ext/phalcon.h index 6c81c55e658..9dcd0b86abb 100644 --- a/ext/phalcon.h +++ b/ext/phalcon.h @@ -326,5 +326,5 @@ #include "events/exception.h" #include "image.h" #include "image/adapterinterface.h" -#include "image/adapter/gd.h" #include "image/exception.h" +#include "image/adapter/gd.h"