diff doc/manual/manual_bindings.tex @ 490:17287342e273

manual: - removed all API description and referred to manual instead, to avoid outdated and/or duplicated doc - cleanups and clarificaions
author Tassilo Philipp
date Sun, 20 Mar 2022 14:26:55 +0100
parents b47168dacba6
children 48eede2fa034
line wrap: on
line diff
--- a/doc/manual/manual_bindings.tex	Fri Mar 18 12:36:49 2022 +0100
+++ b/doc/manual/manual_bindings.tex	Sun Mar 20 14:26:55 2022 +0100
@@ -105,6 +105,7 @@
 \sigchar{d} & double \\
 \sigchar{p} & void* \\
 \sigchar{Z} & const char* (pointing to C string) \\
+\sigchar{A} & aggregate (struct, union) by-value \\
 \end{tabular*}
 \caption{Type signature encoding for function call data types}
 \label{sigchar}
@@ -132,6 +133,7 @@
 Signature character & Calling Convention \\
 \hline
 \sigchar{:} & platform's default calling convention \\
+\sigchar{*} & platform's default C++/thiscall calling convention \\
 \sigchar{e} & vararg function \\
 \sigchar{.} & vararg function's variadic/ellipsis part (...), to be specified before first vararg \\
 \sigchar{c} & only on x86: cdecl \\
@@ -154,7 +156,6 @@
 \paragraph{Examples of C function prototypes}
 
 \begin{table}[h]
-\begin{center}
 \begin{tabular*}{0.75\textwidth}{rll}
 & C function prototype & dyncall signature \\
 \hline
@@ -163,11 +164,12 @@
 long long & f3(void*);                                & \sigstr{p)L}\\
 void      & f3(int**);                                & \sigstr{p)v}\\
 double    & f4(int, bool, char, double, const char*); & \sigstr{iBcdZ)d}\\
-void      & f5(short a, long long b, ...)             & \sigstr{\_esl\_.di)v} (for (promoted) varargs: double, int)\\
+void      & f5(short, long long, ...);                & \sigstr{\_esl\_.di)v} (for (promoted) varargs: double, int)\\
+struct A  & f6(int, union B);                         & \sigstr{iA)A}\\
+short     & Cls::f(unsigned char, ...);               & \sigstr{\_*p\_eC\_.i)A} (C++: this-ptr as 1st arg, int as vararg)\\
 \end{tabular*}
-\caption{Type signature examples of C function prototypes}
+\caption{Type signature examples of function prototypes}
 \label{sigex}
-\end{center}
 \end{table}
 
 
@@ -237,8 +239,7 @@
 namely {\tt load}, {\tt find}, {\tt free}, {\tt call}, {\tt new\_callback}, {\tt free\_callback}.
 
 \begin{table}[h]
-\begin{center}
-\begin{tabular*}{0.75\textwidth}{lll}
+\begin{tabular*}{1.0\textwidth}{lll}
 Signature character & accepted Python 2 types & accepted Python 3 types \\
 \hline
 \sigchar{v}              & no return type                                     & no return type                                \\
@@ -255,7 +256,6 @@
 \end{tabular*}
 \caption{Type signature encoding for Python bindings}
 \label{Pysigchar}
-\end{center}
 \end{table}
 
 This is a very brief description that omits many details. For more, refer to the README.txt file of the binding.