+       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

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to