瀏覽代碼

clang compiling

viest 7 年之前
父節點
當前提交
9056a7d634
共有 5 個文件被更改,包括 16 次插入4 次删除
  1. 2 0
      config.m4
  2. 3 4
      kernel/excel.c
  3. 3 0
      kernel/excel.h
  4. 2 0
      kernel/exception.h
  5. 6 0
      php_vtiful.h

+ 2 - 0
config.m4

@@ -41,4 +41,6 @@ if test "$PHP_VTIFUL" != "no"; then
     PHP_SUBST(VTIFUL_SHARED_LIBADD)
     PHP_SUBST(VTIFUL_SHARED_LIBADD)
 
 
     PHP_NEW_EXTENSION(vtiful, $vtiful_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
     PHP_NEW_EXTENSION(vtiful, $vtiful_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
+
+    PHP_ADD_BUILD_DIR([$ext_builddir/kernel])
 fi
 fi

+ 3 - 4
kernel/excel.c

@@ -20,7 +20,6 @@
 
 
 #include "php.h"
 #include "php.h"
 
 
-#include "php_vtiful.h"
 #include "excel.h"
 #include "excel.h"
 #include "exception.h"
 #include "exception.h"
 #include "write.h"
 #include "write.h"
@@ -244,7 +243,7 @@ PHP_METHOD(vtiful_excel, insertText)
 {
 {
     zval rv, res_handle;
     zval rv, res_handle;
     zval *attr_handle, *data;
     zval *attr_handle, *data;
-    zend_long *row, *column;
+    zend_long row, column;
     excel_resource_t *res;
     excel_resource_t *res;
 
 
     ZEND_PARSE_PARAMETERS_START(3, 3)
     ZEND_PARSE_PARAMETERS_START(3, 3)
@@ -273,7 +272,7 @@ PHP_METHOD(vtiful_excel, insertImage)
 {
 {
     zval rv, res_handle;
     zval rv, res_handle;
     zval *attr_handle, *image;
     zval *attr_handle, *image;
-    zend_long *row, *column;
+    zend_long row, column;
     excel_resource_t *res;
     excel_resource_t *res;
 
 
     ZEND_PARSE_PARAMETERS_START(3, 3)
     ZEND_PARSE_PARAMETERS_START(3, 3)
@@ -302,7 +301,7 @@ PHP_METHOD(vtiful_excel, insertFormula)
 {
 {
     zval rv, res_handle;
     zval rv, res_handle;
     zval *attr_handle, *formula;
     zval *attr_handle, *formula;
-    zend_long *row, *column;
+    zend_long row, column;
     excel_resource_t *res;
     excel_resource_t *res;
 
 
     ZEND_PARSE_PARAMETERS_START(3, 3)
     ZEND_PARSE_PARAMETERS_START(3, 3)

+ 3 - 0
kernel/excel.h

@@ -13,6 +13,7 @@
 #ifndef VTIFUL_EXCEL_H
 #ifndef VTIFUL_EXCEL_H
 #define VTIFUL_EXCEL_H
 #define VTIFUL_EXCEL_H
 
 
+#include "php_vtiful.h"
 #include "xlsxwriter.h"
 #include "xlsxwriter.h"
 
 
 typedef struct {
 typedef struct {
@@ -29,4 +30,6 @@ extern zend_class_entry *vtiful_excel_ce;
 
 
 excel_resource_t * zval_get_resource(zval *handle);
 excel_resource_t * zval_get_resource(zval *handle);
 
 
+VTIFUL_STARTUP_FUNCTION(excel);
+
 #endif
 #endif

+ 2 - 0
kernel/exception.h

@@ -15,4 +15,6 @@
 
 
 extern zend_class_entry *vtiful_exception_ce;
 extern zend_class_entry *vtiful_exception_ce;
 
 
+VTIFUL_STARTUP_FUNCTION(vtiful_exception);
+
 #endif
 #endif

+ 6 - 0
php_vtiful.h

@@ -44,6 +44,12 @@ void _php_vtiful_excel_close(zend_resource *rsrc TSRMLS_DC);
 ZEND_TSRMLS_CACHE_EXTERN();
 ZEND_TSRMLS_CACHE_EXTERN();
 #endif
 #endif
 
 
+PHP_MINIT_FUNCTION(vtiful);
+PHP_MSHUTDOWN_FUNCTION(vtiful);
+PHP_RINIT_FUNCTION(vtiful);
+PHP_RSHUTDOWN_FUNCTION(vtiful);
+PHP_MINFO_FUNCTION(vtiful);
+
 #endif
 #endif