EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   World Perl10 fix (https://www.eqemulator.org/forums/showthread.php?t=27805)

Cripp 04-03-2009 01:33 AM

World Perl10 fix
 
I noticed after I upgraded to perl10.. i couldn't use the world http management anymore.
It straight up crashes the world when I try and login.
This will fix this...

Code:

Index: EQWParser.cpp
===================================================================
--- EQWParser.cpp        (revision 395)
+++ EQWParser.cpp        (working copy)
@@ -75,20 +75,23 @@
 }
 
 void EQWParser::DoInit() {
-       
-        //arguments for interpreter start
-        const char *args[] = { "", "-w", "-W", "-e", "0;", NULL };
-       
-       
+        const char *argv_eqemu[] = { "",
+                "-w", "-W",
+                "-e", "0;", NULL };
+
+        int argc = 5;
+
+        char **argv = (char **)argv_eqemu;
+        char **env = { NULL };
+
+        PL_perl_destruct_level = 1;
+
        perl_construct(my_perl);
-       
-       
-        if(perl_parse(my_perl, xs_init,
-                5,
-                (char **) args, NULL)) {
-                _log(WORLD__PERL_ERR, "Error: perl_parse failed!");
-                return;
-        }
+
+        PERL_SYS_INIT3(&argc, &argv, &env);
+
+        perl_parse(my_perl, xs_init, argc, argv, env);
+
        perl_run(my_perl);
       
        //a little routine we use a lot.


cavedude 04-21-2009 02:05 PM

Thanks, this will be in my next commit!

cavedude 05-03-2009 04:18 PM

This has been committed in Revision 454.


All times are GMT -4. The time now is 01:45 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.