Re: cvs: php-src /ext/date php_date.c php_date.h /ext/date/lib timelib.c timelib.h
| From: | Derick Rethans | Date: | Fri, 02 May 2008 10:22:27 +0000 |
| Subject: | Re: cvs: php-src /ext/date php_date.c php_date.h /ext/date/lib timelib.c timelib.h | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-49795@lists.php.net to get a copy of this message | ||
On Fri, 2 May 2008, Marcus Boerger wrote:
> Hello Derick,
>
> Thursday, May 1, 2008, 2:10:25 AM, you wrote:
>
> >
> > http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.178&r2=1.179&diff_format=u
> > Index: php-src/ext/date/php_date.c
> > diff -u php-src/ext/date/php_date.c:1.178 php-src/ext/date/php_date.c:1.179
> > --- php-src/ext/date/php_date.c:1.178 Fri Apr 25 12:55:16 2008
> > +++ php-src/ext/date/php_date.c Thu May 1 00:10:25 2008
> ...
> > +/* {{{ date_period_it_current_data */
> > +static void date_period_it_current_data(zend_object_iterator *iter, zval ***data
> > TSRMLS_DC)
> > +{
> > + date_period_it *iterator = (date_period_it *)iter;
> > + php_period_obj *object = iterator->object;
> > + timelib_time *it_time = object->start;
> > + php_date_obj *newdateobj;
> > +
> > + /* apply modification */
> > + it_time->relative.y = object->interval->y;
> > + it_time->relative.m = object->interval->m;
> > + it_time->relative.d = object->interval->d;
> > + it_time->relative.h = object->interval->h;
> > + it_time->relative.i = object->interval->i;
> > + it_time->relative.s = object->interval->s;
> > + it_time->relative.weekday = object->interval->weekday;
>
> Can you not simply do it_time->relative = object->interval?
Yeah, I will clean up a bit later - there's more things to clean up as
well.
> > +/* {{{ date_period_it_current_key */
> > +static int date_period_it_current_key(zend_object_iterator *iter, char
> > **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC)
> > +{
> > + date_period_it *iterator = (date_period_it *)iter;
> > + php_period_obj *object = iterator->object;
>
> Funny indentation here. Lemme guess *iterator has a tab in the front while
> *object doesn't. That is copied several times, which is why I spotted it.
hmm, will check.
regards,
Derick