Here's dl.c

Is the Zend directory doable as well, or is that off-limits for some
reason or another?  That's really the place I should be working on
first, because it's the lowest level.

xoxo,
Andy

-- 
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance
Index: ext/standard/dl.c
===================================================================
--- ext/standard/dl.c   (revision 1)
+++ ext/standard/dl.c   (working copy)
@@ -97,7 +97,7 @@
 #define USING_ZTS 0
 #endif
 
-PHPAPI int php_load_extension(char *filename, int type, int start_now 
TSRMLS_DC) /* {{{ */
+PHPAPI int php_load_extension(const char *filename, int type, int start_now 
TSRMLS_DC) /* {{{ */
 {
        void *handle;
        char *libpath;
@@ -244,12 +244,10 @@
 
 /* {{{ php_dl
  */
-PHPAPI void php_dl(zval *file, int type, zval *return_value, int start_now 
TSRMLS_DC)
+PHPAPI void php_dl(const zval *file, int type, zval *return_value, int 
start_now TSRMLS_DC)
 {
-       char *filename;
+       const char * const filename = Z_STRVAL_P(file);
 
-       filename = Z_STRVAL_P(file);
-
        /* Load extension */
        if (php_load_extension(filename, type, start_now TSRMLS_CC) == FAILURE) 
{
                RETVAL_FALSE;
@@ -266,7 +264,7 @@
 
 #else
 
-PHPAPI void php_dl(zval *file, int type, zval *return_value, int start_now 
TSRMLS_DC)
+PHPAPI void php_dl(const zval *file, int type, zval *return_value, int 
start_now TSRMLS_DC)
 {
        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot dynamically load %s 
- dynamic modules are not supported", Z_STRVAL_P(file));
        RETURN_FALSE;
Index: ext/standard/dl.h
===================================================================
--- ext/standard/dl.h   (revision 1)
+++ ext/standard/dl.h   (working copy)
@@ -23,8 +23,8 @@
 #ifndef DL_H
 #define DL_H
 
-PHPAPI int php_load_extension(char *filename, int type, int start_now 
TSRMLS_DC);
-PHPAPI void php_dl(zval *file,int type, zval *return_value, int start_now 
TSRMLS_DC);
+PHPAPI int php_load_extension(const char *filename, int type, int start_now 
TSRMLS_DC);
+PHPAPI void php_dl(const zval *file,int type, zval *return_value, int 
start_now TSRMLS_DC);
 
 /* dynamic loading functions */
 PHP_FUNCTION(dl);
Index: tags
===================================================================
--- tags        (revision 14)
+++ tags        (working copy)
@@ -21857,7 +21857,7 @@
 php_disk_total_space   ext/standard/filestat.c /^static int 
php_disk_total_space(char *path, double *space TSRMLS_DC) \/* {{{ *\/$/;"  f    
   file:
 php_dispatch_vtbl      ext/com_dotnet/com_wrapper.c    /^static struct 
IDispatchExVtbl php_dispatch_vtbl = {$/;"       v       
typeref:struct:IDispatchExVtbl  file:
 php_dispatchex ext/com_dotnet/com_wrapper.c    /^} php_dispatchex;$/;" t       
typeref:struct:__anon245        file:
-php_dl ext/standard/dl.c       /^PHPAPI void php_dl(zval *file, int type, zval 
*return_value, int start_now TSRMLS_DC)$/;"     f
+php_dl ext/standard/dl.c       /^PHPAPI void php_dl(const zval *file, int 
type, zval *return_value, int start_now TSRMLS_DC)$/;"       f
 php_dns_free_res       ext/standard/dns.c      364;"   d       file:
 php_dns_free_res       ext/standard/dns.c      375;"   d       file:
 php_do_chgrp   ext/standard/filestat.c /^static void 
php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) \/* {{{ *\/$/;" f     
  file:
@@ -22261,7 +22261,7 @@
 php_lcg_globals        ext/standard/php_lcg.h  /^} php_lcg_globals;$/;"        
t       typeref:struct:__anon151
 php_le_stream_context  ext/standard/file.c     /^PHPAPI int 
php_le_stream_context(void)$/;"    f
 php_lint_script        main/main.c     /^PHPAPI int 
php_lint_script(zend_file_handle *file TSRMLS_DC)$/;"      f
-php_load_extension     ext/standard/dl.c       /^PHPAPI int 
php_load_extension(char *filename, int type, int start_now TSRMLS_DC) \/* {{{ 
*\/$/;"      f
+php_load_extension     ext/standard/dl.c       /^PHPAPI int 
php_load_extension(const char *filename, int type, int start_now TSRMLS_DC) \/* 
{{{ *\/$/;"        f
 php_load_php_extension_cb      main/php_ini.c  /^static void 
php_load_php_extension_cb(void *arg TSRMLS_DC)$/;"        f       file:
 php_load_zend_extension_cb     main/php_ini.c  /^static void 
php_load_zend_extension_cb(void *arg TSRMLS_DC)$/;"       f       file:
 php_localtime_r        main/reentrancy.c       /^PHPAPI struct tm 
*php_localtime_r(const time_t *const timep, struct tm *p_tm)$/;"     f

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to