wez             Tue Feb 18 14:03:45 2003 EDT

  Modified files:              
    /php4/ext/rpc/com   com.c 
    /php4/main/streams  streams.c 
  Log:
  Fix incorrect TSRMLS_CC usage.
  Fix com_create_guid()
  
Index: php4/ext/rpc/com/com.c
diff -u php4/ext/rpc/com/com.c:1.24 php4/ext/rpc/com/com.c:1.25
--- php4/ext/rpc/com/com.c:1.24 Tue Feb 18 04:46:18 2003
+++ php4/ext/rpc/com/com.c      Tue Feb 18 14:03:43 2003
@@ -841,7 +841,7 @@
                ZEND_WRONG_PARAM_COUNT();
        }
 
-       if (CoCreateGuid(&retval) && StringFromCLSID(&retval, &guid_string)) {
+       if (CoCreateGuid(&retval) == S_OK && StringFromCLSID(&retval, &guid_string) == 
+S_OK) {
                Z_TYPE_P(return_value) = IS_STRING;
                Z_STRVAL_P(return_value) = php_OLECHAR_to_char(guid_string, 
&Z_STRLEN_P(return_value), CP_ACP, 0);
 
Index: php4/main/streams/streams.c
diff -u php4/main/streams/streams.c:1.3 php4/main/streams/streams.c:1.4
--- php4/main/streams/streams.c:1.3     Mon Feb 17 20:39:26 2003
+++ php4/main/streams/streams.c Tue Feb 18 14:03:44 2003
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.3 2003/02/18 01:39:26 wez Exp $ */
+/* $Id: streams.c,v 1.4 2003/02/18 19:03:44 wez Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -1198,6 +1198,7 @@
        size_t readchunk;
        size_t haveread = 0;
        size_t didread;
+       php_stream_statbuf ssbuf;
 #if HAVE_MMAP
        int srcfd;
 #endif
@@ -1243,14 +1244,11 @@
        }
 #endif
 
-       {
-               php_stream_statbuf sbuf;
-               if (php_stream_stat(src, &sbuf TSRMLS_CC) == 0) {
-                       /* in the event that the source file is 0 bytes, return 1 to 
indicate success
-                        * because opening the file to write had already created a 
copy */
-                       if (sbuf.sb.st_size == 0) {
-                               return 1;
-                       }
+       if (php_stream_stat(src, &ssbuf) == 0) {
+               /* in the event that the source file is 0 bytes, return 1 to indicate 
+success
+                * because opening the file to write had already created a copy */
+               if (ssbuf.sb.st_size == 0) {
+                       return 1;
                }
        }
 



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

Reply via email to