Skip to content

Commit

Permalink
add 7.2 to travis, fix 7.2 build
Browse files Browse the repository at this point in the history
  • Loading branch information
krakjoe committed Jan 20, 2017
1 parent 90a619d commit 90fb023
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
@@ -1,6 +1,7 @@
language: php
php:
- 7.0
- 7.1
- nightly
install:
- sudo apt-get update
Expand Down
11 changes: 10 additions & 1 deletion src/copy.c
Expand Up @@ -165,8 +165,17 @@ static inline zend_arg_info* uopz_copy_arginfo(zend_op_array *op_array, zend_arg
while (it < end) {
if (info[it].name)
info[it].name = zend_string_copy(old[it].name);
#if PHP_VERSION_ID >= 70200
if (ZEND_TYPE_IS_SET(old[it].type) && ZEND_TYPE_IS_CLASS(old[it].type)) {
info[it].type = ZEND_TYPE_ENCODE_CLASS(
zend_string_new(
ZEND_TYPE_NAME(info[it].type)),
ZEND_TYPE_ALLOW_NULL(info[it].type));
}
#else
if (info[it].class_name)
info[it].class_name = zend_string_copy(old[it].class_name);
info[it].class_name = zend_string_new(old[it].class_name);
#endif
it++;
}

Expand Down

3 comments on commit 90fb023

@Jan-E
Copy link

@Jan-E Jan-E commented on 90fb023 Jan 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krakjoe This commit broke the extension for PHP 7.0 (VC14, ts, x86):

C:\php-sdk\php70dev>nmake php_uopz.dll

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        "cl.exe" /D COMPILE_DL_UOPZ /D UOPZ_EXPORTS=1 /Iext\uopz /nologo /I . /I main /I Ze
nd /I TSRM /I ext /D _WINDOWS /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 /FD /wd4
996 /D_USE_32BIT_TIME_T=1 /guard:cf /MP /Zi /LD /MD /W3 /Ox /D NDebug /D NDEBUG /D ZEND_WIN
32_FORCE_INLINE /GF /D ZEND_DEBUG=0 /D ZTS=1 /I "C:\php-sdk\win32build\include" /D FD_SETSI
ZE=256 /FoC:\php-sdk\php70dev\Release_TS\ext\uopz\ /FpC:\php-sdk\php70dev\Release_TS\ext\uo
pz\ /FRC:\php-sdk\php70dev\Release_TS\ext\uopz\ /FdC:\php-sdk\php70dev\Release_TS\ext\uopz\
 /c ext\uopz\uopz.c
uopz.c
        "cl.exe" /D COMPILE_DL_UOPZ /D UOPZ_EXPORTS=1 /Iext\uopz /nologo /I . /I main /I Ze
nd /I TSRM /I ext /D _WINDOWS /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 /FD /wd4
996 /D_USE_32BIT_TIME_T=1 /guard:cf /MP /Zi /LD /MD /W3 /Ox /D NDebug /D NDEBUG /D ZEND_WIN
32_FORCE_INLINE /GF /D ZEND_DEBUG=0 /D ZTS=1 /I "C:\php-sdk\win32build\include" /D FD_SETSI
ZE=256 /FoC:\php-sdk\php70dev\Release_TS\ext\uopz\src\ /FpC:\php-sdk\php70dev\Release_TS\ex
t\uopz\src\ /FRC:\php-sdk\php70dev\Release_TS\ext\uopz\src\ /FdC:\php-sdk\php70dev\Release_
TS\ext\uopz\src\ /c ext\uopz\src\class.c ext\uopz\src\constant.c ext\uopz\src\copy.c ext\uo
pz\src\executors.c ext\uopz\src\function.c ext\uopz\src\handlers.c ext\uopz\src\hook.c ext\
uopz\src\return.c ext\uopz\src\util.c
class.c
constant.c
copy.c
executors.c
ext\uopz\src\copy.c(177): warning C4013: 'zend_string_new' undefined; assuming extern retur
ning int
ext\uopz\src\copy.c(177): warning C4047: '=': 'zend_string *' differs in levels of indirect
ion from 'int'
function.c
handlers.c
hook.c
return.c
util.c
Recreating build dirs
Recreating build dirs
Recreating build dirs
Recreating build dirs
Recreating build dirs
Recreating build dirs
libiconv_a.lib(iconv1.obj) : MSIL .netmodule or module compiled with /GL found; restarting
link with /LTCG; add /LTCG to the link command line to improve linker performance
   Creating library C:\php-sdk\php70dev\Release_TS\php7ts.lib and object C:\php-sdk\php70de
v\Release_TS\php7ts.exp
Generating code
Finished generating code
   Creating library C:\php-sdk\php70dev\Release_TS\php_uopz.lib and object C:\php-sdk\php70
dev\Release_TS\php_uopz.exp
copy.obj : error LNK2019: unresolved external symbol _zend_string_new referenced in functio
n _uopz_copy_closure
C:\php-sdk\php70dev\Release_TS\php_uopz.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\lin
k.exe"' : return code '0x460'
Stop.

@krakjoe
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9634704

Thanks for heads up ;)

@Jan-E
Copy link

@Jan-E Jan-E commented on 90fb023 Jan 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix confirmed

Please sign in to comment.