iliaa           Sun Dec 14 15:35:51 2008 UTC

  Modified files:              
    /php-src/ext/mssql  php_mssql.c 
  Log:
  
  MFB: simplify code
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?r1=1.184&r2=1.185&diff_format=u
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.184 php-src/ext/mssql/php_mssql.c:1.185
--- php-src/ext/mssql/php_mssql.c:1.184 Thu Dec 11 15:33:18 2008
+++ php-src/ext/mssql/php_mssql.c       Sun Dec 14 15:35:51 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_mssql.c,v 1.184 2008/12/11 15:33:18 pajoye Exp $ */
+/* $Id: php_mssql.c,v 1.185 2008/12/14 15:35:51 iliaa Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -980,11 +980,7 @@
                        if (!res_length) {
                                ZVAL_NULL(result);
                        } else {
-                               bin = ((DBBINARY *)dbdata(mssql_ptr->link, 
offset));
-                               res_buf = (unsigned char *) 
emalloc(res_length+1);
-                               memcpy(res_buf,bin,res_length);
-                               res_buf[res_length] = '\0';
-                               ZVAL_STRINGL(result, res_buf, res_length, 0);
+                               ZVAL_STRINGL(result, (char 
*)dbdata(mssql_ptr->link, offset)), res_length, 1);
                        }
                        }
                        break;



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

Reply via email to