tony2001                Thu Jan 22 03:39:51 2004 EDT

  Modified files:              
    /php-src/ext/oci8   oci8.c 
  Log:
  add missing protos
  and some minor changes
  
  
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.237&r2=1.238&ty=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.237 php-src/ext/oci8/oci8.c:1.238
--- php-src/ext/oci8/oci8.c:1.237       Thu Jan 22 03:05:14 2004
+++ php-src/ext/oci8/oci8.c     Thu Jan 22 03:39:50 2004
@@ -22,7 +22,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: oci8.c,v 1.237 2004/01/22 08:05:14 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.238 2004/01/22 08:39:50 tony2001 Exp $ */
 
 /* TODO list:
  *
@@ -785,7 +785,7 @@
 
        php_info_print_table_start();
        php_info_print_table_row(2, "OCI8 Support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.237 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.238 $");
 
        sprintf(buf, "%ld", num_persistent);
        php_info_print_table_row(2, "Active Persistent Links", buf);
@@ -3798,7 +3798,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_save()
+/* {{{ proto bool oci_lob_save( string data [, int offset ])
    Saves a large object */
 PHP_FUNCTION(oci_lob_save)
 {
@@ -3892,7 +3892,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_import()
+/* {{{ proto bool oci_lob_import( string filename )
    Saves a large object to file */
 PHP_FUNCTION(oci_lob_import)
 {
@@ -4002,7 +4002,7 @@
 }
 /* }}} */
 
-/* {{{ proto string oci_lob_read()
+/* {{{ proto string oci_lob_read( int length )
    Reads particular part of a large object */
 PHP_FUNCTION(oci_lob_read)
 {
@@ -4105,7 +4105,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_seek()
+/* {{{ proto bool oci_lob_seek( int offset [, int whence ])
    Moves the pointer of a LOB */
 PHP_FUNCTION(oci_lob_seek)
 {
@@ -4189,7 +4189,7 @@
 }
 /* }}} */
 
-/* {{{ proto int oci_lob_write()
+/* {{{ proto int oci_lob_write( string string [, int length ])
    Writes data to current position of a LOB */
 PHP_FUNCTION(oci_lob_write)
 {
@@ -4280,7 +4280,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_append()
+/* {{{ proto bool oci_lob_append( object lob )
    Appends data from a LOB to another LOB */
 PHP_FUNCTION(oci_lob_append)
 {
@@ -4311,6 +4311,7 @@
                }
                
                if (zend_get_parameters_ex(1, &arg) == SUCCESS) {
+                       convert_to_object_ex(arg);
                        if ((inx = _oci_get_ocidesc(*arg,&from_descr TSRMLS_CC)) == 0) 
{
                                RETURN_FALSE;
                        }
@@ -4355,7 +4356,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_truncate()
+/* {{{ proto bool oci_lob_truncate( [ int length ])
    Truncates a LOB */
 PHP_FUNCTION(oci_lob_truncate)
 {
@@ -4424,7 +4425,7 @@
 }
 /* }}} */
 
-/* {{{ proto int oci_lob_erase()
+/* {{{ proto int oci_lob_erase( [ int offset [, int length ] ] )
    Erases a specified portion of the internal LOB, starting at a specified offset */
 PHP_FUNCTION(oci_lob_erase)
 {
@@ -4501,7 +4502,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_flush()
+/* {{{ proto bool oci_lob_flush( [ int flag ] )
    Flushes the LOB buffer */
 PHP_FUNCTION(oci_lob_flush)
 {
@@ -4549,7 +4550,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool ocisetbufferinglob()
+/* {{{ proto bool ocisetbufferinglob( boolean flag )
    Enables/disables buffering for a LOB */
 PHP_FUNCTION(ocisetbufferinglob)
 {
@@ -4671,7 +4672,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_copy()
+/* {{{ proto bool oci_lob_copy( object lob_to, object lob_from [, int length ] )
    Copies data from a LOB to another LOB */
 PHP_FUNCTION(oci_lob_copy)
 {
@@ -4686,9 +4687,8 @@
                        WRONG_PARAM_COUNT;
                }
 
-               if ((*arg1)->type != IS_OBJECT || (*arg2)->type != IS_OBJECT) {
-                       RETURN_FALSE;
-               }
+               convert_to_object_ex(arg1);
+               convert_to_object_ex(arg2);
                
                if ((inx = _oci_get_ocidesc(*arg1,&descr TSRMLS_CC)) == 0 || (inx = 
_oci_get_ocidesc(*arg2,&from_descr TSRMLS_CC)) == 0) {
                        RETURN_FALSE;
@@ -4743,7 +4743,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool oci_lob_is_equal()
+/* {{{ proto bool oci_lob_is_equal( object lob1, object lob2 )
    Tests to see if two LOB/FILE locators are equal */
 PHP_FUNCTION(oci_lob_is_equal)
 {
@@ -4758,10 +4758,9 @@
                        WRONG_PARAM_COUNT;
                }
 
-               if ((*arg1)->type != IS_OBJECT || (*arg2)->type != IS_OBJECT) {
-                       RETURN_FALSE;
-               }
-
+               convert_to_object_ex(arg1);
+               convert_to_object_ex(arg2);
+               
                if ((inx = _oci_get_ocidesc(*arg1,&first_descr TSRMLS_CC)) == 0 || 
(inx = _oci_get_ocidesc(*arg2,&second_descr TSRMLS_CC)) == 0) {
                        RETURN_FALSE;
                }

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

Reply via email to