kalle                                    Thu, 23 Sep 2010 04:13:36 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=303708

Log:
Added TSRMLS macros into php_get_current_user()

Changed paths:
    UU  php/php-src/trunk/UPGRADING.INTERNALS
    U   php/php-src/trunk/ext/mysql/php_mysql.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c
    U   php/php-src/trunk/ext/soap/php_sdl.c
    U   php/php-src/trunk/ext/standard/basic_functions.c
    U   php/php-src/trunk/main/main.c
    U   php/php-src/trunk/main/php.h

Modified: php/php-src/trunk/UPGRADING.INTERNALS
===================================================================
--- php/php-src/trunk/UPGRADING.INTERNALS       2010-09-23 04:08:34 UTC (rev 
303707)
+++ php/php-src/trunk/UPGRADING.INTERNALS       2010-09-23 04:13:36 UTC (rev 
303708)
@@ -96,3 +96,7 @@

 . popen_ex (win32)
   TSRM_API FILE *popen_ex(const char *command, const char *type, const char 
*cwd, char *env TSRMLS_DC);
+
+. php_get_current_user
+  PHPAPI php_get_current_user(TSRMLS_D)
+  Call: char *user = php_get_current_user(TSRMLS_C);
\ No newline at end of file


Property changes on: php/php-src/trunk/UPGRADING.INTERNALS
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: php/php-src/trunk/ext/mysql/php_mysql.c
===================================================================
--- php/php-src/trunk/ext/mysql/php_mysql.c     2010-09-23 04:08:34 UTC (rev 
303707)
+++ php/php-src/trunk/ext/mysql/php_mysql.c     2010-09-23 04:13:36 UTC (rev 
303708)
@@ -735,7 +735,7 @@
                        php_error_docref(NULL TSRMLS_CC, E_NOTICE, "SQL safe 
mode in effect - ignoring host/user/password information");
                }
                host_and_port=passwd=NULL;
-               user=php_get_current_user();
+               user=php_get_current_user(TSRMLS_C);
                hashed_details_length = spprintf(&hashed_details, 0, 
"mysql__%s_", user);
                client_flags = CLIENT_INTERACTIVE;
        } else {

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c     2010-09-23 04:08:34 UTC (rev 
303707)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c     2010-09-23 04:13:36 UTC (rev 
303708)
@@ -27,8 +27,6 @@
 #include "mysqlnd_statistics.h"
 #include "mysqlnd_charset.h"
 #include "mysqlnd_debug.h"
-/* for php_get_current_user() */
-#include "ext/standard/basic_functions.h"

 /*
   TODO :

Modified: php/php-src/trunk/ext/soap/php_sdl.c
===================================================================
--- php/php-src/trunk/ext/soap/php_sdl.c        2010-09-23 04:08:34 UTC (rev 
303707)
+++ php/php-src/trunk/ext/soap/php_sdl.c        2010-09-23 04:13:36 UTC (rev 
303708)
@@ -3192,7 +3192,7 @@
                unsigned char digest[16];
                int len = strlen(SOAP_GLOBAL(cache_dir));
                time_t cached;
-               char *user = php_get_current_user();
+               char *user = php_get_current_user(TSRMLS_C);
                int user_len = user ? strlen(user) + 1 : 0;

                md5str[0] = '\0';

Modified: php/php-src/trunk/ext/standard/basic_functions.c
===================================================================
--- php/php-src/trunk/ext/standard/basic_functions.c    2010-09-23 04:08:34 UTC 
(rev 303707)
+++ php/php-src/trunk/ext/standard/basic_functions.c    2010-09-23 04:13:36 UTC 
(rev 303708)
@@ -4471,7 +4471,7 @@
                return;
        }

-       RETURN_STRING(php_get_current_user(), 1);
+       RETURN_STRING(php_get_current_user(TSRMLS_C), 1);
 }
 /* }}} */


Modified: php/php-src/trunk/main/main.c
===================================================================
--- php/php-src/trunk/main/main.c       2010-09-23 04:08:34 UTC (rev 303707)
+++ php/php-src/trunk/main/main.c       2010-09-23 04:13:36 UTC (rev 303708)
@@ -1087,10 +1087,9 @@

 /* {{{ php_get_current_user
  */
-PHPAPI char *php_get_current_user(void)
+PHPAPI char *php_get_current_user(TSRMLS_D)
 {
        struct stat *pstat;
-       TSRMLS_FETCH();

        if (SG(request_info).current_user) {
                return SG(request_info).current_user;

Modified: php/php-src/trunk/main/php.h
===================================================================
--- php/php-src/trunk/main/php.h        2010-09-23 04:08:34 UTC (rev 303707)
+++ php/php-src/trunk/main/php.h        2010-09-23 04:13:36 UTC (rev 303708)
@@ -329,7 +329,7 @@
 PHPAPI int php_mergesort(void *base, size_t nmemb, register size_t size, int 
(*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC);
 PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void 
*userdata);
 PHPAPI void php_com_initialize(TSRMLS_D);
-PHPAPI char *php_get_current_user(void);
+PHPAPI char *php_get_current_user(TSRMLS_D);
 END_EXTERN_C()

 /* PHP-named Zend macro wrappers */

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

Reply via email to