Re: cvs: php-src /ext/spl spl_directory.c spl_directory.h

From: Date: Wed, 17 Jan 2007 17:23:07 +0000
Subject: Re: cvs: php-src /ext/spl spl_directory.c spl_directory.h
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42757@lists.php.net to get a copy of this message
+ if (intern->file_name.v) { + efree(intern->file_name.s);
Why not be consistent here and free intern->file_name.v?
- if (!intern->file_name) { + if (!intern->file_name.s) {
I think it's clearer to check for intern->file_name.v, because otherwise it looks like you care only about .s part of the union.
+#if defined(PHP_WIN32) || defined(NETWARE) +# define is_slash(c) (c == '/' || c == '\\') +#else +# define is_slash(c) (c == '/') +#endif + +#define is_slash_at(type, zs, pos) (type == IS_UNICODE ? is_slash(zs.u[pos]) : is_slash(zs.s[pos]))
We already have these macros in tsrm_virtual_cwd.c (IS_SLASH, IS_U_SLASH, etc). -Andrei On Jan 16, 2007, at 3:52 PM, Marcus Boerger wrote:
helly Tue Jan 16 23:52:14 2007 UTC Modified files:
    /php-src/ext/spl	spl_directory.c spl_directory.h
Log: - Steps towards unicode <helly-20070116235214.txt> --PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.cvs (#42757) next »