Commit 85f55c95 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Brace yourself, SWIG is coming

parent f43d9174
Pipeline #68820 passed with stage
in 1 minute and 7 seconds
......@@ -3,7 +3,7 @@ image: tarotbis/build:latest
before_script:
- apt-get update
- apt-get upgrade -y
- apt-get install -y --no-install-recommends texlive-base texlive-latex-base git ca-certificates texlive-fonts-recommended texlive-generic-recommended autoconf automake gettext autopoint libtool texinfo gnulib autoconf-archive gobject-introspection make gcc valac valac-vapi gtk-doc-tools flex bison gperf nettle-dev libgtk-3-dev libgirepository1.0-dev emacs org-mode indent doxygen graphviz lcov dejagnu check libxml2-utils xsltproc wget gengetopt help2man libreadline-dev libunistring-dev
- apt-get install -y --no-install-recommends texlive-base texlive-latex-base git ca-certificates texlive-fonts-recommended texlive-generic-recommended autoconf automake gettext autopoint libtool texinfo gnulib autoconf-archive gobject-introspection make gcc valac valac-vapi gtk-doc-tools flex bison gperf nettle-dev libgtk-3-dev libgirepository1.0-dev emacs org-mode indent doxygen graphviz lcov dejagnu check libxml2-utils xsltproc wget gengetopt help2man libreadline-dev libunistring-dev valgrind
stages:
- deploy
......
FROM debian:stable
RUN apt-get update
RUN apt-get install -y --no-install-recommends texlive-base texlive-latex-base git ca-certificates texlive-fonts-recommended texlive-generic-recommended autoconf automake gettext autopoint libtool texinfo gnulib autoconf-archive gobject-introspection make gcc valac valac-vapi gtk-doc-tools flex bison gperf nettle-dev libgtk-3-dev libgirepository1.0-dev emacs org-mode indent doxygen graphviz lcov dejagnu check libxml2-utils xsltproc wget gengetopt help2man libreadline-dev libunistring-dev
RUN apt-get install -y --no-install-recommends texlive-base texlive-latex-base git ca-certificates texlive-fonts-recommended texlive-generic-recommended autoconf automake gettext autopoint libtool texinfo gnulib autoconf-archive gobject-introspection make gcc valac valac-vapi gtk-doc-tools flex bison gperf nettle-dev libgtk-3-dev libgirepository1.0-dev emacs org-mode indent doxygen graphviz lcov dejagnu check libxml2-utils xsltproc wget gengetopt help2man libreadline-dev libunistring-dev valgrind
RUN apt-get upgrade -y
MAINTAINER framagit.org/gugurumbe/tarot
\ No newline at end of file
......@@ -100,20 +100,20 @@ org_verbose_0 = @echo "ORG-EXPORT $@";
SUFFIXES += .org .md
.org.md:
$(org_verbose) echo "$(srcdir)/$@" \
| ./missing emacs "$(srcdir)/$<" \
| $(EMACS) "$(srcdir)/$<" \
--batch \
--eval "(require 'ox-md)" \
-f org-md-export-to-markdown
README: %reldir%/README.org
$(org_verbose) (echo "$(srcdir)/README.txt" \
| ./missing emacs "$(srcdir)/README.org" \
| $(EMACS) "$(srcdir)/README.org" \
--batch \
--eval "(require 'ox-ascii)" \
-f org-ascii-export-to-ascii \
&& mv "$(srcdir)/README.txt" "$(srcdir)/README")
AUTHORS: %reldir%/AUTHORS.org
$(org_verbose) (echo "$(srcdir)/AUTHORS.txt" \
| ./missing emacs "$(srcdir)/AUTHORS.org" \
| $(EMACS) "$(srcdir)/AUTHORS.org" \
--batch \
--eval "(require 'ox-ascii)" \
-f org-ascii-export-to-ascii \
......
......@@ -18,7 +18,8 @@ _________________
..... 4.1.2 The CI/CD pipeline
.. 4.2 Everyone: configure, make and install
5 Introspection and cross-compilation
6 Let me know
6 Language bindings
7 Let me know
......@@ -162,7 +163,48 @@ http://gugurumbe.frama.io/tarot/tarot-devel.tar.gz
bug!
6 Let me know
6 Language bindings
===================
You may use SWIG to generate language bindings for the project. Look
at the following example:
,----
| rm -rf readme-swig-example
| mkdir readme-swig-example
| mkdir readme-swig-example/build
| mkdir readme-swig-example/prefix
| export README_SWIG_PREFIX="$PWD/readme-swig-example/prefix"
| (cd readme-swig-example/build
| ../../configure --prefix=$README_SWIG_PREFIX \
| CFLAGS="-Wall -Wextra -Werror -g -O0" \
| --enable-silent-rules=yes \
| --enable-code-coverage=yes \
| --with-libunistring=yes || exit 1
| make -j 8 install 2> compilation.err || exit 1) \
| > readme-swig-example/compilation.log
| export PKG_CONFIG_PATH="$README_SWIG_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
| (cd readme-swig-example
| swig -python -o python_wrapper.c "$README_SWIG_PREFIX/include/tarot.h" || exit 1
| gcc -c -fpic \
| $(pkg-config --cflags libtarot) \
| $(python3-config --cflags) \
| python_wrapper.c || exit 1
| gcc -shared -o _tarot.so \
| $(pkg-config --libs libtarot) \
| $(python3-config --libs) \
| python_wrapper.o || exit 1
| ) > readme-swig-example/python.log
| echo "Python binding installed."
`----
,----
| import tarot
| tarot.libtarot_version ()
`----
7 Let me know
=============
I develop Tarot as a personal hobby. If you find it interesting, or
......
# Table of Contents
1. [READ ME](#org9f06ff3)
2. [About tarot](#org4bf0263)
3. [Project site](#orgc9ca723)
4. [Compile this project](#orga627b20)
1. [Gitlab users: make a source distribution](#org1ec3712)
1. [The git pre-commit hook](#org325403e)
2. [The CI/CD pipeline](#org311ea92)
2. [Everyone: configure, make and install](#org1a24dae)
5. [Introspection and cross-compilation](#orgd6dad60)
6. [Let me know](#orgb6d349a)
1. [READ ME](#org7d1a07b)
2. [About tarot](#org0f74afd)
3. [Project site](#orge2a7085)
4. [Compile this project](#org09d6011)
1. [Gitlab users: make a source distribution](#org03bc96f)
1. [The git pre-commit hook](#org90757dc)
2. [The CI/CD pipeline](#org8425279)
2. [Everyone: configure, make and install](#org45382f4)
5. [Introspection and cross-compilation](#org850f34e)
6. [Language bindings](#org7f30f4e)
7. [Let me know](#org8f9a4d5)
<a id="org9f06ff3"></a>
<a id="org7d1a07b"></a>
# READ ME
RUN THE CONFIGURE SCRIPT NOT `autogen.sh`. If you don't have a
configure script, see section [4.1](#org1ec3712).
configure script, see section [4.1](#org03bc96f).
<a id="org4bf0263"></a>
<a id="org0f74afd"></a>
# About tarot
......@@ -31,14 +32,14 @@ Of Tarot*. It aims at providing a game and an artificial
intelligence.
<a id="orgc9ca723"></a>
<a id="orge2a7085"></a>
# Project site
Go check out the [project manual](http://gugurumbe.frama.io/tarot/share/doc/tarot/tarot.html/index.html) and the [project code coverage report](http://gugurumbe.frama.io/tarot/coverage/index.html).
<a id="orga627b20"></a>
<a id="org09d6011"></a>
# Compile this project
......@@ -50,7 +51,7 @@ some more work. Note that a source distribution is already available
my autotools!).
<a id="org1ec3712"></a>
<a id="org03bc96f"></a>
## Gitlab users: make a source distribution
......@@ -62,10 +63,10 @@ distribution, such as emacs with a recent enough version of org-mode
is *not* available, or difficult to install, then I advise you to make
a *source* distribution from an easier system or download [the build
from the latest passing commit](http://gugurumbe.frama.io/tarot/tarot-devel.tar.gz), and then use this distribution as
discussed in section [4.2](#org1a24dae).
discussed in section [4.2](#org45382f4).
<a id="org325403e"></a>
<a id="org90757dc"></a>
### The git pre-commit hook
......@@ -89,7 +90,7 @@ the project. And if you disable the hook, then the CI pipeline is
very likely to fail anyways.
<a id="org311ea92"></a>
<a id="org8425279"></a>
### The CI/CD pipeline
......@@ -105,7 +106,7 @@ Dockerfile and `.gitlab-ci.yml`.
I already have bison, flex and gperf, and emacs, in that category.
<a id="org1a24dae"></a>
<a id="org45382f4"></a>
## Everyone: configure, make and install
......@@ -121,7 +122,7 @@ a pkg-config configuration. In this case, pass the compiler flags and
linker flags as instructed at the end of `./configure --help`.
<a id="orgd6dad60"></a>
<a id="org850f34e"></a>
# Introspection and cross-compilation
......@@ -149,7 +150,45 @@ Here is a way out: if you intend to change the source code,
bug!
<a id="orgb6d349a"></a>
<a id="org7f30f4e"></a>
# Language bindings
You may use SWIG to generate language bindings for the project.
Look at the following example:
rm -rf readme-swig-example
mkdir readme-swig-example
mkdir readme-swig-example/build
mkdir readme-swig-example/prefix
export README_SWIG_PREFIX="$PWD/readme-swig-example/prefix"
(cd readme-swig-example/build
../../configure --prefix=$README_SWIG_PREFIX \
CFLAGS="-Wall -Wextra -Werror -g -O0" \
--enable-silent-rules=yes \
--enable-code-coverage=yes \
--with-libunistring=yes || exit 1
make -j 8 install 2> compilation.err || exit 1) \
> readme-swig-example/compilation.log
export PKG_CONFIG_PATH="$README_SWIG_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
(cd readme-swig-example
swig -python -o python_wrapper.c "$README_SWIG_PREFIX/include/tarot.h" || exit 1
gcc -c -fpic \
$(pkg-config --cflags libtarot) \
$(python3-config --cflags) \
python_wrapper.c || exit 1
gcc -shared -o _tarot.so \
$(pkg-config --libs libtarot) \
$(python3-config --libs) \
python_wrapper.o || exit 1
) > readme-swig-example/python.log
echo "Python binding installed."
import tarot
tarot.libtarot_version ()
<a id="org8f9a4d5"></a>
# Let me know
......
......@@ -100,6 +100,72 @@ Here is a way out: if you intend to change the source code,
generally not using cross-compilation myself so the theory may not
hold in practice. If you still get an error, then please, report a
bug!
* Language bindings
You may use SWIG to generate language bindings for the project.
Look at the following example:
#+BEGIN_SRC sh :results output drawer :session *compile*
rm -rf readme-swig-example
mkdir readme-swig-example
mkdir readme-swig-example/build
mkdir readme-swig-example/prefix
export README_SWIG_PREFIX="$PWD/readme-swig-example/prefix"
(cd readme-swig-example/build
../../configure --prefix=$README_SWIG_PREFIX \
CFLAGS="-Wall -Wextra -Werror -g -O0" \
--enable-silent-rules=yes \
--enable-code-coverage=yes \
--with-libunistring=yes || exit 1
make -j 8 install 2> compilation.err || exit 1) \
> readme-swig-example/compilation.log
export PKG_CONFIG_PATH="$README_SWIG_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
(cd readme-swig-example
swig -python -o python_wrapper.c "$README_SWIG_PREFIX/include/tarot.h" || exit 1
gcc -c -fpic \
$(pkg-config --cflags libtarot) \
$(python3-config --cflags) \
python_wrapper.c || exit 1
gcc -shared -o _tarot.so \
$(pkg-config --libs libtarot) \
$(python3-config --libs) \
python_wrapper.o || exit 1
) > readme-swig-example/python.log
echo "Python binding installed."
#+END_SRC
#+RESULTS:
:RESULTS:
sh-4.4$ sh-4.4$ sh-4.4$ sh-4.4$ > > > > > > > configure: WARNING: Could not find libunistring with pkg-config... Trying sensible defaults.
configure: WARNING: Could not find readline with pkg-config... Trying sensible defaults.
sh-4.4$ > > > > > > > > > > /home/vivien/Documents/Prog/tarot/libtarot-core/readme-swig-example/prefix/include/tarot.h:38: Error: Syntax error in input(1).
Python binding installed.
:END:
#+BEGIN_SRC emacs-lisp :exports none
(setq org-babel-load-languages
'((shell . t)
(emacs-lisp . t)
(python . t)))
(org-babel-do-load-languages 'org-babel-load-languages
org-babel-load-languages)
(setenv "LD_LIBRARY_PATH"
(format "%sreadme-swig-example/prefix/lib:%s"
default-directory
(getenv "LD_LIBRARY_PATH")))
#+END_SRC
#+RESULTS:
: /home/vivien/Documents/Prog/tarot/libtarot-core/readme-swig-example/prefix/lib:/home/vivien/Documents/Prog/tarot/libtarot-core//readme-swig-example/prefix/lib:nil
#+BEGIN_SRC python :dir readme-swig-example :session
import tarot
tarot.libtarot_version ()
#+END_SRC
#+RESULTS:
: 0:0:0
* Let me know
I develop Tarot as a personal hobby. If you find it interesting, or
have bugs to submit, please let me know: =vivien@planete-kraus.eu=
......@@ -32,6 +32,7 @@ AM_MISSING_PROG([BISON], [bison])
AM_MISSING_PROG([GENGETOPT], [gengetopt])
AM_MISSING_PROG([HELP2MAN], [help2man])
AM_MISSING_PROG([INDENT], [indent])
AM_MISSING_PROG([EMACS], [emacs])
AC_ARG_ENABLE([valgrind], AS_HELP_STRING([--enable-valgrind=yes],
[Run the unit tests under valgrind (slow, incompatible with asan)]))
AS_IF([test "x$enable_valgrind" = "xyes"], [
......
......@@ -30,7 +30,7 @@ EXTRA_DIST += \
%reldir%/tarot.texi: %reldir%/tarot.org configure.ac
$(AM_V_GEN) (cd $(srcdir)/%reldir% && \
cat tarot.org | sed "s/@VERSION@/$(VERSION)/g" > tarot-tmp.org && \
yes yes | $(abs_top_srcdir)/missing emacs --batch -q \
yes yes | $(EMACS) --batch -q \
--file tarot-tmp.org \
--eval "(require 'ox-texinfo)" \
-f org-babel-tangle \
......
......@@ -24,10 +24,50 @@
#include <tarot/allocator.h>
#include <tarot/bid.h>
#include <tarot/card.h>
#include <tarot/cards.h>
#include <tarot/player.h>
#include <tarot/step.h>
#include <tarot/game_event.h>
#include <tarot/game.h>
#include <tarot/player.h>
#include <tarot/cards.h>
size_t tarot_libtarot_version (size_t max_dst, char *dst);
#ifdef SWIG
%module tarot;
%ignore tarot_libtarot_version;
%ignore xmalloc;
%newobject libtarot_version;
static char *libtarot_version (void);
size_t tarot_libtarot_version (size_t max_dst, char *dst);
%inline
{
#include <tarot.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
static void *xmalloc (size_t sz)
{
void *ret = malloc (sz);
if (ret == NULL)
{
fprintf (stderr, "Dynamic memory exhausted.\n");
abort ();
}
return ret;
}
static char *libtarot_version (void)
{
size_t needed = tarot_libtarot_version (0, NULL);
char *ret = xmalloc (needed + 1);
size_t check = tarot_libtarot_version (needed, ret);
assert (check == needed);
(void) check;
return ret;
}
}
#endif /* SWIG */
#endif /* not H_TAROT_INCLUDED */
......@@ -406,8 +406,7 @@ game_serialize (const TarotGameHandle * game, size_t * n_events,
}
static int
game_load (TarotGameHandle * game, size_t n_events,
const TarotGameEvent ** events)
game_load (TarotGameHandle * game, size_t n_events, TarotGameEvent ** events)
{
size_t i = 0;
for (i = 0; i < n_events; i++)
......
......@@ -46,16 +46,16 @@ extern "C"
int tarot_game_serialize (const TarotGame * game, size_t * n_events,
size_t max_events, TarotGameEvent ** events);
int tarot_game_load (TarotGame * game, size_t n_events,
const TarotGameEvent ** events);
TarotGameEvent ** events);
size_t tarot_game_n_players (const TarotGame * game);
int tarot_game_with_call (const TarotGame * game);
int tarot_game_has_next (const TarotGame * game);
TarotPlayer tarot_game_next (const TarotGame * game);
int tarot_game_get_deal (const TarotGame * game, TarotPlayer * myself,
size_t max, size_t * n, TarotCard * dest);
size_t * n, size_t max, TarotCard * dest);
int tarot_game_get_deal_all (const TarotGame * game, TarotPlayer * owners);
int tarot_game_get_cards (const TarotGame * game, TarotPlayer who,
size_t max, size_t * n, TarotCard * dest);
size_t * n, size_t max, TarotCard * dest);
size_t tarot_game_get_n_bids (const TarotGame * game);
int tarot_game_get_bid (const TarotGame * game, TarotPlayer player,
TarotBid * bid);
......@@ -66,14 +66,14 @@ extern "C"
int tarot_game_get_slammer (const TarotGame * game, TarotPlayer * slammer);
int tarot_game_get_call (const TarotGame * game, TarotCard * card);
int tarot_game_get_partner (const TarotGame * game, TarotPlayer * partner);
int tarot_game_get_dog (const TarotGame * game, size_t max, size_t * n,
int tarot_game_get_dog (const TarotGame * game, size_t * n, size_t max,
TarotCard * dest);
int tarot_game_get_discard (const TarotGame * game, size_t max, size_t * n,
int tarot_game_get_discard (const TarotGame * game, size_t * n, size_t max,
TarotCard * dest);
int tarot_game_get_public_discard (const TarotGame * game, size_t max,
size_t * n, TarotCard * dest);
int tarot_game_get_public_discard (const TarotGame * game, size_t * n,
size_t max, TarotCard * dest);
int tarot_game_get_handful (const TarotGame * game, TarotPlayer p,
int *size, size_t max, size_t * n,
int *size, size_t * n, size_t max,
TarotCard * dest);
unsigned int tarot_game_n_tricks (const TarotGame * game);
unsigned int tarot_game_current_trick (const TarotGame * game);
......@@ -105,18 +105,19 @@ extern "C"
int tarot_game_hint_call (const TarotGame * game, TarotPlayer * player,
TarotNumber * mini);
int tarot_game_hint_discard (const TarotGame * game, TarotPlayer * player,
size_t * n, size_t max_prio, TarotCard * prio,
size_t * n_prio, size_t max_additional,
TarotCard * additional, size_t * n_additional);
size_t * n,
size_t * n_prio, size_t max_prio,
TarotCard * prio, size_t * n_additional,
size_t max_additional, TarotCard * additional);
int tarot_game_hint_handful (const TarotGame * game, TarotPlayer * player,
size_t * n_simple, size_t * n_double,
size_t * n_triple, size_t max_prio,
TarotCard * prio, size_t * n_prio,
size_t max_additional, TarotCard * additional,
size_t * n_additional);
size_t * n_triple, size_t * n_prio,
size_t max_prio, TarotCard * prio,
size_t * n_additional, size_t max_additional,
TarotCard * additional);
int tarot_game_hint_card (const TarotGame * game, TarotPlayer * player,
size_t max_playable, TarotCard * playable,
size_t * n_playable);
size_t * n_playable, size_t max_playable,
TarotCard * playable);
int tarot_game_check_event (const TarotGame * game,
const TarotGameEvent * event);
int tarot_game_add_event (TarotGame * game, const TarotGameEvent * event);
......
......@@ -124,7 +124,7 @@ extern "C"
static int game_serialize (const TarotGameHandle * game, size_t * n_events,
size_t max_events, TarotGameEvent ** events);
static int game_load (TarotGameHandle * game, size_t n_events,
const TarotGameEvent ** events);
TarotGameEvent ** events);
static size_t game_n_players (const TarotGameHandle * game);
static int game_with_call (const TarotGameHandle * game);
static int game_start (TarotGameHandle * game);
......
......@@ -47,6 +47,7 @@ tarot_hand_copy (TarotHand * dest, const TarotHand * src)
{
unsigned int i = 0, max = 0;
assert (is_consistent (src));
(void) &is_consistent;
max = *(src->n);
if (dest->n_max < max)
{
......
......@@ -33,7 +33,7 @@ extern "C"
*/
typedef unsigned int TarotPlayer;
/* Return ((TarotCard) (-1) if error */
/* Return ((TarotPlayer) (-1) if error */
TarotPlayer tarot_string_to_player (const char *text);
size_t tarot_player_to_string (TarotPlayer p, size_t max, char *dest);
......
......@@ -29,7 +29,7 @@ extern "C"
{
#endif /* __cplusplus */
enum TarotStep
typedef enum
{
TAROT_SETUP,
TAROT_DEAL,
......@@ -40,9 +40,8 @@ extern "C"
TAROT_DISCARD,
TAROT_TRICKS,
TAROT_END
};
typedef enum TarotStep TarotStep;
}
TarotStep;
#ifdef __cplusplus
}
......
......@@ -159,8 +159,7 @@ tarot_game_serialize (const TarotGame * game, size_t * n_events,
}
int
tarot_game_load (TarotGame * game, size_t n_events,
const TarotGameEvent ** events)
tarot_game_load (TarotGame * game, size_t n_events, TarotGameEvent ** events)
{
TarotGameHandle h;
size_t i = 0;
......@@ -212,8 +211,8 @@ tarot_game_next (const TarotGame * game)
}
int
tarot_game_get_deal (const TarotGame * game, TarotPlayer * myself, size_t max,
size_t * n, TarotCard * buffer)
tarot_game_get_deal (const TarotGame * game, TarotPlayer * myself, size_t * n,
size_t max, TarotCard * buffer)
{
TarotGameHandle h;
TarotHand dest;
......@@ -233,8 +232,8 @@ tarot_game_get_deal_all (const TarotGame * game, TarotPlayer * owners)
}
int
tarot_game_get_cards (const TarotGame * game, TarotPlayer who, size_t max,
size_t * n, TarotCard * buffer)
tarot_game_get_cards (const TarotGame * game, TarotPlayer who, size_t * n,
size_t max, TarotCard * buffer)
{
TarotGameHandle h;
TarotHand dest;
......@@ -312,7 +311,7 @@ tarot_game_get_partner (const TarotGame * game, TarotPlayer * partner)
}
int
tarot_game_get_dog (const TarotGame * game, size_t max, size_t * n,
tarot_game_get_dog (const TarotGame * game, size_t * n, size_t max,
TarotCard * dest)
{
TarotGameHandle h;
......@@ -326,7 +325,7 @@ tarot_game_get_dog (const TarotGame * game, size_t max, size_t * n,
}
int
tarot_game_get_discard (const TarotGame * game, size_t max, size_t * n,
tarot_game_get_discard (const TarotGame * game, size_t * n, size_t max,
TarotCard * dest)
{
TarotGameHandle h;
......@@ -340,7 +339,7 @@ tarot_game_get_discard (const TarotGame * game, size_t max, size_t * n,
}
int
tarot_game_get_public_discard (const TarotGame * game, size_t max, size_t * n,
tarot_game_get_public_discard (const TarotGame * game, size_t * n, size_t max,
TarotCard * dest)
{
TarotGameHandle h;
......@@ -355,7 +354,7 @@ tarot_game_get_public_discard (const TarotGame * game, size_t max, size_t * n,
int
tarot_game_get_handful (const TarotGame * game, TarotPlayer p, int *size,
size_t max, size_t * n, TarotCard * dest)
size_t * n, size_t max, TarotCard * dest)
{
TarotGameHandle h;
TarotHand handful;
......@@ -472,9 +471,10 @@ tarot_game_hint_call (const TarotGame * game, TarotPlayer * player,
int
tarot_game_hint_discard (const TarotGame * game, TarotPlayer * player,
size_t * n, size_t max_prio, TarotCard * prio,
size_t * n_prio, size_t max_additional,
TarotCard * additional, size_t * n_additional)
size_t * n,
size_t * n_prio, size_t max_prio, TarotCard * prio,
size_t * n_additional,
size_t max_additional, TarotCard * additional)
{
TarotGameHandle h;
TarotHand h_prio, h_additional;
......@@ -491,9 +491,9 @@ tarot_game_hint_discard (const TarotGame * game, TarotPlayer * player,
int
tarot_game_hint_handful (const TarotGame * game, TarotPlayer * player,
size_t * ns, size_t * nd, size_t * nt,
size_t max_prio, TarotCard * prio, size_t * n_prio,
size_t max_additional, TarotCard * additional,
size_t * n_additional)
size_t * n_prio, size_t max_prio, TarotCard * prio,
size_t * n_additional,
size_t max_additional, TarotCard * additional)
{
TarotGameHandle h;
TarotHand h_prio, h_additional;
......@@ -509,8 +509,8 @@ tarot_game_hint_handful (const TarotGame * game, TarotPlayer * player,
int
tarot_game_hint_card (const TarotGame * game, TarotPlayer * player,
size_t max_playable, TarotCard * playable,
size_t * n_playable)
size_t * n_playable,
size_t max_playable, TarotCard * playable)
{
TarotGameHandle h;