potion  0.2
 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 "potion.h"
#include "internal.h"
#include "table.h"
+ Include dependency graph for load.c:

Go to the source code of this file.

Functions

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)
 

Variables

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.

Function Documentation

static PN potion_load_code ( Potion P,
const char *  filename 
)
static

Definition at line 16 of file load.c.

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

Definition at line 47 of file load.c.

static PN potion_load_dylib ( Potion P,
const char *  filename 
)
static

Definition at line 64 of file load.c.

static const char* find_extension ( char *  str)
static

Definition at line 93 of file load.c.

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

Definition at line 111 of file load.c.

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

Definition at line 155 of file load.c.

void potion_loader_add ( Potion P,
PN  path 
)

Definition at line 183 of file load.c.

void potion_loader_init ( Potion P)

Definition at line 187 of file load.c.

Variable Documentation

PN pn_loader_path
static

Definition at line 86 of file load.c.

const char* pn_loader_extensions[]
static
Initial value:
= {
".pnb"
, ".pn"
}
#define POTION_LOADEXT
Definition: config.h:15

Definition at line 87 of file load.c.