p2  0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
load.c File Reference

loading of external code, bytecode and shared libs More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <dlfcn.h>
#include <sys/stat.h>
#include "p2.h"
#include "internal.h"
#include "table.h"
+ Include dependency graph for load.c:

Go to the source code of this file.




static PN potion_load_code (Potion *P, const char *filename)
static char * potion_initializer_name (Potion *P, const char *filename, PN_SIZE len)
static PN potion_load_dylib (Potion *P, const char *filename)
static const char * find_extension (char *str)
char * potion_find_file (Potion *P, char *str, PN_SIZE str_len)
PN potion_load (Potion *P, PN cl, PN self, PN file)
void potion_loader_add (Potion *P, PN path)
void potion_loader_init (Potion *P)


static PN pn_loader_path
static const char * pn_loader_extensions []

Detailed Description

loading of external code, bytecode and shared libs

(c) 2008 why the lucky stiff, the freelance professor (c) 2013 by perl11 org

Definition in file load.c.

Macro Definition Documentation


Function Documentation

static PN potion_load_code ( Potion P,
const char *  filename 

Definition at line 16 of file load.c.

static char* potion_initializer_name ( Potion P,
const char *  filename,
PN_SIZE  len 

Definition at line 47 of file load.c.

static PN potion_load_dylib ( Potion P,
const char *  filename 

Definition at line 64 of file load.c.

static const char* find_extension ( char *  str)

Definition at line 100 of file load.c.

char* potion_find_file ( Potion P,
char *  str,
PN_SIZE  str_len 

Definition at line 118 of file load.c.

PN potion_load ( Potion P,
PN  cl,
PN  self,
PN  file 

Definition at line 163 of file load.c.

void potion_loader_add ( Potion P,
PN  path 

Definition at line 221 of file load.c.

void potion_loader_init ( Potion P)

Definition at line 225 of file load.c.

Variable Documentation

PN pn_loader_path

Definition at line 86 of file load.c.

const char* pn_loader_extensions[]
Initial value:
= {
, ".pn"
Definition: config.h:15

Definition at line 87 of file load.c.