annotate lua/luadyncall/doc/guide.tex @ 29:6cc2b7fc7ea2

bigger pydc update: - cleanups and refactoring - python 2 fixes in var conversions (especially w/ respect to int vs long) - fix to pydc.free() which didn't work at all - fix to return python bool as actual bool - test lib covering all conversions (manual verification, though :-/)
author Tassilo Philipp
date Wed, 08 Apr 2020 22:17:43 +0200
parents 0cfcc391201f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 \documentclass{article}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2 \begin{document}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 \section{Introduction}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 The luadyncall package is a framework for writing system-level software
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 using lua.
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8 It uses the libraries from the DynCall Project for the low-level implementation
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9 such as code loading, symbol resolving and invocation of function calls.
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11 It implements the portable dynamic linkage system 'dynport' for lua which
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 allows to bind whole shared C libraries with a single command.
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 \section{Overview}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 This package provides the following extensions:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 \begin{description}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 \item [dynload] dynamic loading of code and resolving of C functions
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 \item [dyncall] dynamic calling of loaded C functions
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 \item [dynport] dynamic binding of whole shared C libraries
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 \item [array] allocate and access C-typed arrays
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23 \item [smartptr] smart pointer utility
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 \item [int64] 64-bit (unsigned) integer datatype for lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 \item [ldynguess] guess the operating system
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26 \end{description}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 \section{C Pointers}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 One major issue was to decide how to handle pointer values and in
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 particular NULL pointers using dynports.
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 Lua can compare pointer-values. The current dyncall implementation comes with
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34 a function \verb@topointer(value)@ which makes a pointer value from an integer
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 value. There is also a \verb@NULL@ variable which holds a pointer value of 0.
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37 \section{Dynport}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39 \subsection {The LDP\_PATH environment variable}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41 The variable contains the patterns to search for dynport files when
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42 \verb@dynport("someport")@ is called.
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 \end{document}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45