Skip to content

Commit b19ef88

Browse files
committed
added more logging
1 parent 7a0df15 commit b19ef88

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ vips extension changelog
33
dev
44
---
55
* Lower min vips version to 8.2, see #4
6+
* Add more logging
67

78
Version 1.0.2 (2016-12-06)
89
--------------------------
File renamed without changes.

package.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
1515
<email>jcupitt@php.net</email>
1616
<active>yes</active>
1717
</lead>
18-
<date>2016-12-06</date>
18+
<date>2016-12-20</date>
1919
<version>
20-
<release>1.0.2</release>
20+
<release>1.0.3</release>
2121
<api>1.0.0</api>
2222
</version>
2323
<stability>
@@ -34,7 +34,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
3434
<file role='doc' name='CREDITS'/>
3535
<file role='doc' name='LICENSE.txt'/>
3636
<file role='doc' name='README.md'/>
37-
<file role='doc' name='RELEASE-1.0.2'/>
37+
<file role='doc' name='RELEASE-1.0.3'/>
3838
<file role='doc' name='ChangeLog'/>
3939

4040
<file role='src' name='config.m4'/>
@@ -89,7 +89,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
8989
</extsrcrelease>
9090
<changelog>
9191

92-
<release>
92+
<release>
9393
<stability><release>stable</release><api>stable</api></stability>
9494
<version><release>1.0.2</release><api>1.0.0</api></version>
9595
<date>2016-12-06</date>

php_vips.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
extern zend_module_entry vips_module_entry;
66
#define phpext_vips_ptr &vips_module_entry
77

8-
#define PHP_VIPS_VERSION "1.0.2"
8+
#define PHP_VIPS_VERSION "1.0.3"
99

1010
#ifdef PHP_WIN32
1111
# define PHP_VIPS_API __declspec(dllexport)

vips-1.0.3.tgz

541 KB
Binary file not shown.

vips.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
/* Uncomment for some logging.
6-
#define VIPS_DEBUG
76
*/
7+
#define VIPS_DEBUG
88

99
#ifdef HAVE_CONFIG_H
1010
#include "config.h"
@@ -18,6 +18,10 @@
1818
#include <vips/vips.h>
1919
#include <vips/debug.h>
2020

21+
#undef VIPS_DEBUG_MSG
22+
#define VIPS_DEBUG_MSG( ... ) \
23+
G_STMT_START { fprintf( stderr, __VA_ARGS__ ); fflush( stdout ); } G_STMT_END
24+
2125
/* If you declare any globals in php_vips.h uncomment this:
2226
ZEND_DECLARE_MODULE_GLOBALS(vips)
2327
*/
@@ -1621,6 +1625,8 @@ static void php_free_gobject(zend_resource *rsrc)
16211625
*/
16221626
PHP_MINIT_FUNCTION(vips)
16231627
{
1628+
VIPS_DEBUG_MSG("vips: PHP_MINIT_FUNCTION\n");
1629+
16241630
/* If you have INI entries, uncomment these lines
16251631
REGISTER_INI_ENTRIES();
16261632
*/
@@ -1650,15 +1656,16 @@ PHP_MINIT_FUNCTION(vips)
16501656
*/
16511657
PHP_MSHUTDOWN_FUNCTION(vips)
16521658
{
1659+
VIPS_DEBUG_MSG("vips: PHP_MSHUTDOWN_FUNCTION\n");
1660+
16531661
/* uncomment this line if you have INI entries
16541662
UNREGISTER_INI_ENTRIES();
16551663
*/
16561664

1657-
#ifdef VIPS_DEBUG
1658-
printf( "php-vips-ext shutdown\n" );
1659-
#endif /*VIPS_DEBUG*/
1660-
1665+
/*
1666+
VIPS_DEBUG_MSG("vips: vips_shutdown()\n");
16611667
vips_shutdown();
1668+
*/
16621669

16631670
return SUCCESS;
16641671
}
@@ -1669,6 +1676,8 @@ PHP_MSHUTDOWN_FUNCTION(vips)
16691676
*/
16701677
PHP_RINIT_FUNCTION(vips)
16711678
{
1679+
VIPS_DEBUG_MSG("vips: PHP_RINIT_FUNCTION\n");
1680+
16721681
#if defined(COMPILE_DL_VIPS) && defined(ZTS)
16731682
ZEND_TSRMLS_CACHE_UPDATE();
16741683
#endif
@@ -1681,6 +1690,8 @@ PHP_RINIT_FUNCTION(vips)
16811690
*/
16821691
PHP_RSHUTDOWN_FUNCTION(vips)
16831692
{
1693+
VIPS_DEBUG_MSG("vips: PHP_RSHUTDOWN_FUNCTION\n");
1694+
16841695
return SUCCESS;
16851696
}
16861697
/* }}} */

0 commit comments

Comments
 (0)