Skip to content

Commit 9056a7d

Browse files
committed
clang compiling
1 parent 0c8f6d6 commit 9056a7d

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

config.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ if test "$PHP_VTIFUL" != "no"; then
4141
PHP_SUBST(VTIFUL_SHARED_LIBADD)
4242

4343
PHP_NEW_EXTENSION(vtiful, $vtiful_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
44+
45+
PHP_ADD_BUILD_DIR([$ext_builddir/kernel])
4446
fi

kernel/excel.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#include "php.h"
2222

23-
#include "php_vtiful.h"
2423
#include "excel.h"
2524
#include "exception.h"
2625
#include "write.h"
@@ -244,7 +243,7 @@ PHP_METHOD(vtiful_excel, insertText)
244243
{
245244
zval rv, res_handle;
246245
zval *attr_handle, *data;
247-
zend_long *row, *column;
246+
zend_long row, column;
248247
excel_resource_t *res;
249248

250249
ZEND_PARSE_PARAMETERS_START(3, 3)
@@ -273,7 +272,7 @@ PHP_METHOD(vtiful_excel, insertImage)
273272
{
274273
zval rv, res_handle;
275274
zval *attr_handle, *image;
276-
zend_long *row, *column;
275+
zend_long row, column;
277276
excel_resource_t *res;
278277

279278
ZEND_PARSE_PARAMETERS_START(3, 3)
@@ -302,7 +301,7 @@ PHP_METHOD(vtiful_excel, insertFormula)
302301
{
303302
zval rv, res_handle;
304303
zval *attr_handle, *formula;
305-
zend_long *row, *column;
304+
zend_long row, column;
306305
excel_resource_t *res;
307306

308307
ZEND_PARSE_PARAMETERS_START(3, 3)

kernel/excel.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef VTIFUL_EXCEL_H
1414
#define VTIFUL_EXCEL_H
1515

16+
#include "php_vtiful.h"
1617
#include "xlsxwriter.h"
1718

1819
typedef struct {
@@ -29,4 +30,6 @@ extern zend_class_entry *vtiful_excel_ce;
2930

3031
excel_resource_t * zval_get_resource(zval *handle);
3132

33+
VTIFUL_STARTUP_FUNCTION(excel);
34+
3235
#endif

kernel/exception.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515

1616
extern zend_class_entry *vtiful_exception_ce;
1717

18+
VTIFUL_STARTUP_FUNCTION(vtiful_exception);
19+
1820
#endif

php_vtiful.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ void _php_vtiful_excel_close(zend_resource *rsrc TSRMLS_DC);
4444
ZEND_TSRMLS_CACHE_EXTERN();
4545
#endif
4646

47+
PHP_MINIT_FUNCTION(vtiful);
48+
PHP_MSHUTDOWN_FUNCTION(vtiful);
49+
PHP_RINIT_FUNCTION(vtiful);
50+
PHP_RSHUTDOWN_FUNCTION(vtiful);
51+
PHP_MINFO_FUNCTION(vtiful);
52+
4753
#endif
4854

4955

0 commit comments

Comments
 (0)