Thanks for your advise.

I was in wrong branch (7.0 instead of 7.0.0) so i found the right
UPGRADING.INTERNALS now.
I made some transforms to use zend_string instead of char*/int, and fixed
issues you mentioned, and some others I found in upgrading internals.
Source is in master branch now on
https://github.com/websupport-sk/pecl-memcache.

Questions to UPRADING.INTERNALS:

In memcache there is some sprintf, which doesn't support zend_long, and in
upgdate.internals is mentioned a macro ZEND_INT_FMT, but i didn't find it
in the source. I'm searching in wrong place, or how should be zend_long
used in sprintf?

Which is preferred more on zend_strings, str->val access, or usage of
ZSTR_VAL(str) macros? I found examples for both in php-src/ext/.

Tests:

I use 64bit ubuntu, and I have 2 failing tests:
TEST: ini_set("memcache.chunk_size") [tests/030.phpt]
tests setting chunk_size to 0, and -1, which is not alloved
ini_set by documentation should return false on failed set, but the test
expects string(5) "32768", which is the last value.
I dont want to change the test, because i'm not sure in this yet.

TEST:memcache->getStats() with arguments [tests/034.phpt]
Is failing because of
https://code.google.com/p/memcached/issues/detail?id=66 ,
"stat malloc" was removed from memcache 1.4.

The rest of tests are passing, (and the tests had the same result when i
published this code.)
I'm preparing to test this on windows 10 too, but it will take some time
for me.

On Tue, Nov 10, 2015 at 1:45 PM, Anatol Belski <anatol....@belski.net>
wrote:

> Hi Szabolcs,
>
> > -----Original Message-----
> > From: Szabolcs Balogh [mailto:balog...@szabi.org]
> > Sent: Tuesday, November 10, 2015 1:04 PM
> > To: pecl-dev@lists.php.net
> > Subject: [PECL-DEV] Introduction: Szabi, extension: memcache
> >
> > Hi
> >
> > I'm writing there because of https://pecl.php.net/account-request.php.
> >
> > My name is Szabolcs Balogh(Szabi), working in a webhosting company, and
> > coding.
> >
> > I ported memcache extension to php7 in last weeks, code at:
> > https://github.com/websupport-sk/pecl-
> > memcache/commit/005a35cde8439a053632047eb28e59fcc8cb7ea2
> > bug-report at:
> > https://bugs.php.net/bug.php?id=70751
> >
> > So i want to help with this extension.
> >
> Great start!
>
> Just quick issue summary in your patch, UPGRADING INTERNALS contains the
> most information as well as the PHPNG wiki
>
> - ZPP 'l' format requires zend_long
> - ZPP 's' format requires size_t
> - ZEND_STRTOL is required (together with zend_long) instead of strtol
> (particularly for INI)
> - TSRM_* macros can be removed, and please specifically see the TSRM
> section in UPGRADING.INTERNALS
>
> You probably can spot some issues with 64-bit Linux/Windows builds.
>
> Thanks
>
> Anatol
>
>

Reply via email to