Changeset e5210c9


Ignore:
Timestamp:
Feb 19, 2013, 8:29:05 PM (8 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master
Children:
69f74c2
Parents:
897fc1c
git-author:
David Benjamin <davidben@mit.edu> (06/09/12 23:04:33)
git-committer:
David Benjamin <davidben@mit.edu> (02/19/13 20:29:05)
Message:
dlsym the functions we need after use Glib and before use BarnOwl

After use Glib so the library is loaded. Before use BarnOwl so we try to
use them before they're available.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r06e04a9 re5210c9  
    478478  char **argv_copy;
    479479  char *perlout, *perlerr;
    480   const char *dlerr;
    481480  const owl_style *s;
    482481  const char *dir;
     
    555554  }
    556555
    557   dlerr = owl_closure_init();
    558   if(dlerr) {
    559     endwin();
    560     fprintf(stderr, "Error binding gtk2-perl functions from C: %s\n",dlerr);
    561     fflush(stderr);
    562     fprintf(stdout, "Error binding gtk2-perl functions from C: %s\n",dlerr);
    563     fflush(stdout);
    564     exit(1);
    565   }
    566  
    567556  owl_global_complete_setup(&g);
    568557
  • perlconfig.c

    r353719a re5210c9  
    331331  char *err;
    332332  const char *args[4] = {"", "-e", "0;", NULL};
     333  const char *dlerr;
    333334  AV *inc;
    334335  char *path;
     
    388389  g_free(path);
    389390
     391  /* Load up perl-Glib. */
     392  eval_pv("use Glib;", FALSE);
     393
     394  /* Now, before BarnOwl tries to use them, get the relevant function pointers out. */
     395  dlerr = owl_closure_init();
     396  if (dlerr) {
     397    return g_strdup(dlerr);
     398  }
     399
     400  /* And now it's safe to import BarnOwl. */
    390401  eval_pv("use BarnOwl;", FALSE);
    391402
Note: See TracChangeset for help on using the changeset viewer.