]> granicus.if.org Git - php/commitdiff
Looks like I found my problem.
authorBrendan W. McAdams <bmcadams@php.net>
Wed, 9 Aug 2000 17:43:04 +0000 (17:43 +0000)
committerBrendan W. McAdams <bmcadams@php.net>
Wed, 9 Aug 2000 17:43:04 +0000 (17:43 +0000)
I was predeclaring my functions in ccvs.h (stupid of me), so PHP was seeing the predec from internal_functions.h, the predec again, and then the actual functions and barfing.  Compiles into apache now.  Will test further.

ext/ccvs/ccvs.c
ext/ccvs/ccvs.h

index 339508a02614b59ef25a83ff2233746942741d40..c66ef248e0c386a34c19b4f56498b9bb8c242961 100644 (file)
@@ -37,6 +37,74 @@ static char const cvsid[] = "$Id$";
 #include <string.h>
 #include <ccvs.h>
 
+
+       /* 
+       *       Create the Zend Internal hash construct to track this modules functions
+       *
+       *       In case anyone is wondering why we use ccvs_<action> instead of cv_<action>,
+       *       it's because we are directly importing functions of the actual CCVS, which uses functions that are 
+       *       cv_<action>, and we had problems implementing ZEND_NAMED_FE calls (bug in NAMED_FE? investigate
+       *       later).  We don't want our PHP calls to conflict with the C calls in the CCVS API.
+       *          
+       *       BWM - 2000.07.27@16.41.EST - Added FALIAS Calls.  While I'm of the opinion that naming the 
+       *       functions in PHP ccvs_<action> is much more readable and clear to anyone reading the code than 
+       *       cv_<action>, It strikes me that many people coming from php3 -> php4 will need backwards 
+       *  compatibility.  It was kind of careless to simply change the function calls (There were reasons other
+       *  than readability behind this; the ZEND_NAMED_FE macro was misbehaving) and not provide for 
+       *  backwards compatibility - this *IS* an API and should scale with compatibility. 
+       * 
+       */
+
+       zend_function_entry ccvs_functions[] = {
+               ZEND_FE(ccvs_init,NULL)
+               ZEND_FALIAS(cv_init,ccvs_init,NULL)
+               ZEND_FE(ccvs_done,NULL)
+               ZEND_FALIAS(cv_done,ccvs_done,NULL)
+               ZEND_FE(ccvs_new,NULL)
+               ZEND_FALIAS(cv_new,ccvs_new,NULL)
+               ZEND_FE(ccvs_add,NULL)
+               ZEND_FALIAS(cv_add,ccvs_add,NULL)
+               ZEND_FE(ccvs_delete,NULL)
+               ZEND_FALIAS(cv_delete,ccvs_delete,NULL)
+               ZEND_FE(ccvs_auth,NULL)
+               ZEND_FALIAS(cv_auth,ccvs_auth,NULL)
+               ZEND_FE(ccvs_return,NULL)
+               ZEND_FALIAS(cv_return,ccvs_return,NULL)
+               ZEND_FE(ccvs_reverse,NULL)
+               ZEND_FALIAS(cv_reverse,ccvs_reverse,NULL)
+               ZEND_FE(ccvs_sale,NULL)
+               ZEND_FALIAS(cv_sale,ccvs_sale,NULL)
+               ZEND_FE(ccvs_void,NULL)
+               ZEND_FALIAS(cv_void,ccvs_void,NULL)
+               ZEND_FE(ccvs_status,NULL)
+               ZEND_FALIAS(cv_status,ccvs_status,NULL)
+               ZEND_FE(ccvs_count,NULL)
+               ZEND_FALIAS(cv_count,ccvs_count,NULL)
+               ZEND_FE(ccvs_lookup,NULL)
+               ZEND_FALIAS(cv_lookup,ccvs_lookup,NULL)
+               ZEND_FE(ccvs_report,NULL)
+               ZEND_FALIAS(cv_report,ccvs_report,NULL)
+               ZEND_FE(ccvs_command,NULL)
+               ZEND_FALIAS(cv_command,ccvs_command,NULL)
+               ZEND_FE(ccvs_textvalue,NULL)
+               ZEND_FALIAS(cv_textvalue,ccvs_textvalue,NULL)
+               {NULL,NULL}
+       };
+
+/* End function declarations */
+
+/* Zend Engine Exports - module information */
+
+       /* Declare our module to the Zend engine */
+       zend_module_entry ccvs_module_entry = {
+               "CCVS",
+               ccvs_functions,
+               NULL,NULL,NULL,NULL,
+               PHP_MINFO(ccvs),
+               STANDARD_MODULE_PROPERTIES                                                                 
+       };   
+               
+               
 /* Full Functions (The actual CCVS functions and any internal php hooked functions such as MINFO) */
 
 ZEND_FUNCTION(ccvs_init) /* cv_init() */
index 66406c3e3d95673fb22b76ed6d203b1cc239e1ec..151520b4d74ac705ecf4f08995d3cb99bb559478 100644 (file)
@@ -19,6 +19,7 @@
 
        #include <cv_api.h>
        
+       extern zend_module_entry ccvs_module_entry;
        
        #define ccvs_module_ptr &ccvs_module_entry
        #define phpext_ccvs_ptr ccvs_module_ptr
                ZEND_FUNCTION(ccvs_report);
                ZEND_FUNCTION(ccvs_command);
                ZEND_FUNCTION(ccvs_textvalue); 
-               PHP_MINFO_FUNCTION(ccvs); 
-               
-               /* 
-               *       Create the Zend Internal hash construct to track this modules functions
-               *
-               *       In case anyone is wondering why we use ccvs_<action> instead of cv_<action>,
-               *       it's because we are directly importing functions of the actual CCVS, which uses functions that are 
-               *       cv_<action>, and we had problems implementing ZEND_NAMED_FE calls (bug in NAMED_FE? investigate
-               *       later).  We don't want our PHP calls to conflict with the C calls in the CCVS API.
-               *          
-               *       BWM - 2000.07.27@16.41.EST - Added FALIAS Calls.  While I'm of the opinion that naming the 
-               *       functions in PHP ccvs_<action> is much more readable and clear to anyone reading the code than 
-               *       cv_<action>, It strikes me that many people coming from php3 -> php4 will need backwards 
-               *  compatibility.  It was kind of careless to simply change the function calls (There were reasons other
-               *  than readability behind this; the ZEND_NAMED_FE macro was misbehaving) and not provide for 
-               *  backwards compatibility - this *IS* an API and should scale with compatibility. 
-               * 
-               */
-               
-               zend_function_entry ccvs_functions[] = {
-                       ZEND_FE(ccvs_init,NULL)
-                       ZEND_FALIAS(cv_init,ccvs_init,NULL)
-                       ZEND_FE(ccvs_done,NULL)
-                       ZEND_FALIAS(cv_done,ccvs_done,NULL)
-                       ZEND_FE(ccvs_new,NULL)
-                       ZEND_FALIAS(cv_new,ccvs_new,NULL)
-                       ZEND_FE(ccvs_add,NULL)
-                       ZEND_FALIAS(cv_add,ccvs_add,NULL)
-                       ZEND_FE(ccvs_delete,NULL)
-                       ZEND_FALIAS(cv_delete,ccvs_delete,NULL)
-                       ZEND_FE(ccvs_auth,NULL)
-                       ZEND_FALIAS(cv_auth,ccvs_auth,NULL)
-                       ZEND_FE(ccvs_return,NULL)
-                       ZEND_FALIAS(cv_return,ccvs_return,NULL)
-                       ZEND_FE(ccvs_reverse,NULL)
-                       ZEND_FALIAS(cv_reverse,ccvs_reverse,NULL)
-                       ZEND_FE(ccvs_sale,NULL)
-                       ZEND_FALIAS(cv_sale,ccvs_sale,NULL)
-                       ZEND_FE(ccvs_void,NULL)
-                       ZEND_FALIAS(cv_void,ccvs_void,NULL)
-                       ZEND_FE(ccvs_status,NULL)
-                       ZEND_FALIAS(cv_status,ccvs_status,NULL)
-                       ZEND_FE(ccvs_count,NULL)
-                       ZEND_FALIAS(cv_count,ccvs_count,NULL)
-                       ZEND_FE(ccvs_lookup,NULL)
-                       ZEND_FALIAS(cv_lookup,ccvs_lookup,NULL)
-                       ZEND_FE(ccvs_report,NULL)
-                       ZEND_FALIAS(cv_report,ccvs_report,NULL)
-                       ZEND_FE(ccvs_command,NULL)
-                       ZEND_FALIAS(cv_command,ccvs_command,NULL)
-                       ZEND_FE(ccvs_textvalue,NULL)
-                       ZEND_FALIAS(cv_textvalue,ccvs_textvalue,NULL)
-                       {NULL,NULL}
-               };
-       
-       /* End function declarations */
-       
-       /* Zend Engine Exports - module information */
-       
-               /* Declare our module to the Zend engine */
-               zend_module_entry ccvs_module_entry = {
-                       "CCVS",
-                       ccvs_functions,
-                       NULL,NULL,NULL,NULL,
-                       PHP_MINFO(ccvs),
-                       STANDARD_MODULE_PROPERTIES                                                                 
-               };   
+               PHP_MINFO_FUNCTION(ccvs);
                
                /* Declare the information we need to dynamically link this module later */
                #if COMPILE_DL