[PHP-CVS] cvs: php-src(PHP_5_2) /main/streams userspace.c

2007-08-16 Thread Stanislav Malyshev
stasThu Aug 16 23:54:24 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main/streams   userspace.c 
  Log:
  fix proto
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.31.2.3.2.6r2=1.31.2.3.2.7diff_format=u
Index: php-src/main/streams/userspace.c
diff -u php-src/main/streams/userspace.c:1.31.2.3.2.6 
php-src/main/streams/userspace.c:1.31.2.3.2.7
--- php-src/main/streams/userspace.c:1.31.2.3.2.6   Mon Jul  9 17:27:24 2007
+++ php-src/main/streams/userspace.cThu Aug 16 23:54:24 2007
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: userspace.c,v 1.31.2.3.2.6 2007/07/09 17:27:24 dmitry Exp $ */
+/* $Id: userspace.c,v 1.31.2.3.2.7 2007/08/16 23:54:24 stas Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -443,7 +443,7 @@
 }
 
 
-/* {{{ proto bool stream_wrapper_register(string protocol, string classname)
+/* {{{ proto bool stream_wrapper_register(string protocol, string classname[, 
integer flags])
Registers a custom URL protocol handler class */
 PHP_FUNCTION(stream_wrapper_register)
 {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /main/streams userspace.c

2007-02-13 Thread Antony Dovgal
tony2001Tue Feb 13 19:50:59 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main/streams   userspace.c 
  Log:
  MFH: improve php_userstreamop_seek()
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.31.2.3.2.3r2=1.31.2.3.2.4diff_format=u
Index: php-src/main/streams/userspace.c
diff -u php-src/main/streams/userspace.c:1.31.2.3.2.3 
php-src/main/streams/userspace.c:1.31.2.3.2.4
--- php-src/main/streams/userspace.c:1.31.2.3.2.3   Mon Jan 15 17:07:07 2007
+++ php-src/main/streams/userspace.cTue Feb 13 19:50:59 2007
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: userspace.c,v 1.31.2.3.2.3 2007/01/15 17:07:07 tony2001 Exp $ */
+/* $Id: userspace.c,v 1.31.2.3.2.4 2007/02/13 19:50:59 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -759,6 +759,10 @@
retval = NULL;
}
 
+   if (ret) {
+   return ret;
+   }
+
/* now determine where we are */
ZVAL_STRINGL(func_name, USERSTREAM_TELL, sizeof(USERSTREAM_TELL)-1, 0);
 
@@ -768,16 +772,20 @@
retval,
0, NULL, 0, NULL TSRMLS_CC);
 
-   if (call_result == SUCCESS  retval != NULL  Z_TYPE_P(retval) == 
IS_LONG)
+   if (call_result == SUCCESS  retval != NULL  Z_TYPE_P(retval) == 
IS_LONG) {
*newoffs = Z_LVAL_P(retval);
-   else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s:: 
USERSTREAM_TELL  is not implemented!,
-   us-wrapper-classname);
+   ret = 0;
+   } else if (call_result == FAILURE) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s:: 
USERSTREAM_TELL  is not implemented!, us-wrapper-classname);
+   ret = -1;
+   } else {
+   ret = -1;
+   }
 
-   if (retval)
+   if (retval) {
zval_ptr_dtor(retval);
-   
-   return 0;
+   }
+   return ret;
 }
 
 /* parse the return value from one of the stat functions and store the

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