ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/cfperl.xs
(Generate patch)

Comparing deliantra/server/server/cfperl.xs (file contents):
Revision 1.302 by root, Mon Sep 22 23:57:48 2008 UTC vs.
Revision 1.304 by root, Wed Oct 1 05:50:19 2008 UTC

626 626
627 PL_exit_flags |= PERL_EXIT_DESTRUCT_END; 627 PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
628 628
629 const char *argv[] = { 629 const char *argv[] = {
630 settings.argv [0], 630 settings.argv [0],
631 "-e" 631 "-e0"
632 "use EV; use Coro;" // required for bootstrap
633 "cf->bootstrap;" // required for datadir :*>
634 "unshift @INC, cf::datadir ();"
635 "require cf;"
636 }; 632 };
637 633
638 if (perl_parse (perl, xs_init, 2, (char **)argv, environ) 634 if (perl_parse (perl, xs_init, 2, (char **)argv, environ)
639 || perl_run (perl)) 635 || perl_run (perl))
640 { 636 {
641 printf ("unable to initialize perl-interpreter, aborting.\n"); 637 printf ("unable to initialize perl-interpreter, aborting.\n");
642 exit (EXIT_FAILURE); 638 exit (EXIT_FAILURE);
643 } 639 }
644 640
641 eval_pv (
642 "#line 1 'cfperl init'\n"
643 "use EV ();\n"
644 "use Coro ();\n"
645 "cf->bootstrap;\n"
646 "unshift @INC, cf::datadir ();\n"
647 "require cf;\n",
648 0
649 );
650
651 if (SvTRUE (ERRSV))
645 { 652 {
646 dSP; 653 printf ("unable to bootstrap perl, aborting:\n%s", SvPV_nolen (ERRSV));
647 654 exit (EXIT_FAILURE);
648 PUSHMARK (SP);
649 PUTBACK;
650 call_pv ("cf::init", G_DISCARD | G_VOID);
651 } 655 }
652} 656}
653 657
654void cfperl_main () 658void cfperl_main ()
655{ 659{
656 dSP; 660 dSP;
1521 f (GvGP (gv)->gp_cv); 1525 f (GvGP (gv)->gp_cv);
1522 GvCVGEN (gv) = 0; 1526 GvCVGEN (gv) = 0;
1523 GvMULTI_off (gv); 1527 GvMULTI_off (gv);
1524# undef f 1528# undef f
1525 1529
1526
1527void _connect_to_perl () 1530void _connect_to_perl ()
1528 1531
1529void _recalc_want () 1532void _recalc_want ()
1530 1533
1534# not used by default anymore
1531void _global_reattach () 1535void _global_reattach ()
1532 CODE: 1536 CODE:
1533{ 1537{
1534 // reattach to all attachable objects in the game. 1538 // reattach to all attachable objects in the game.
1535 for_all_clients (ns) 1539 for_all_clients (ns)
1578 len -= 3; 1582 len -= 3;
1579 } 1583 }
1580 1584
1581 SvCUR_set (data_sv, dst - SvPVX (data_sv)); 1585 SvCUR_set (data_sv, dst - SvPVX (data_sv));
1582} 1586}
1587
1588void init_anim ()
1589
1590void init_globals ()
1591
1592void init_experience ()
1593
1594void init_attackmess ()
1595
1596void init_dynamic ()
1597
1598void init_block ()
1599
1600void load_settings ()
1601
1602void load_materials ()
1603
1604void init_uuid ()
1605 CODE:
1606 UUID::init ();
1607
1608void init_signals ()
1609
1610void init_commands ()
1611
1612void init_skills ()
1613
1614void init_beforeplay ()
1583 1615
1584void evthread_start (int aiofd) 1616void evthread_start (int aiofd)
1585 1617
1586void cede_to_tick () 1618void cede_to_tick ()
1587 CODE: 1619 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines