[Numpy-discussion] c++ comments in parse_datetime.c

Charles R Harris charlesr.harris at gmail.com
Tue Aug 25 15:21:15 EDT 2009


On Tue, Aug 25, 2009 at 1:05 PM, Pierre GM <pgmdevlist at gmail.com> wrote:

>
> On Aug 25, 2009, at 1:59 PM, Skipper Seabold wrote:
>
> > On Tue, Aug 25, 2009 at 1:51 PM, Charles R
> > Harris<charlesr.harris at gmail.com> wrote:
> >> Hi Travis,
> >>
> >> The new parse_datetime.c file contains a lot of c++ style comments
> >> that
> >> should be fixed. Also, the new test for mirr is failing on all the
> >> buildbots.
>
> Comments sent to Marty who wrote the parse_datetime.c as part of his
> GSoC: Marty, I guess you have a bit of cleaning up to do.
> (As a snarky side note, Marty posted on the list a few weeks ago
> asking just for this kind of comments... But all is well and better
> late than never.)


My bad, then, I missed it. So let me add

1) Because the default compilation is to include all the files in a master
file, the local defines should be undef'ed at the end to avoid namespace
pollution.

2) Never do this:

 if (bug) return -1;

or this

if (bug) {blah; blah;}

do it this way

if (bug) {
    return -1;
}

The last is more for Travis in the most recent commit ;)

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090825/2e38bb51/attachment.html>


More information about the NumPy-Discussion mailing list