Skip to content

Commit 2f83c27

Browse files
author
nshmyrev
committed
Swig updates for javascript
git-svn-id: svn+ssh://svn.code.sf.net/p/cmusphinx/code/trunk/sphinxbase@13132 94700074-3cef-4d97-a70e-9c8c206c02f5
1 parent afc5e8a commit 2f83c27

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

sphinxbase.pc.in

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ exec_prefix=@exec_prefix@
33
libdir=@libdir@
44
includedir=@includedir@
55
libs="@LIBS@"
6+
datadir=@datarootdir@/@PACKAGE@
67

78
Name: SphinxBase
89
Description: Shared components for Sphinx speech recognition

swig/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SUBDIRS = python
22

3-
swigdir = $(datadir)/@PACKAGE@/swig
3+
swigdir = $(pkgdatadir)/swig
44
dist_swig_DATA = \
55
cmd_ln.i \
66
fe.i \

swig/iterators.i

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef struct {
6464

6565
%extend TYPE##Iterator {
6666
TYPE##Iterator(PREFIX##_t *ptr) {
67-
TYPE##Iterator *iter = ckd_malloc(sizeof *iter);
67+
TYPE##Iterator *iter = (TYPE##Iterator *)ckd_malloc(sizeof *iter);
6868
iter->ptr = ptr;
6969
return iter;
7070
}

swig/sphinxbase.i

+1-4
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,14 @@ negative error code."
6969
#endif
7070

7171
%begin %{
72+
#include <stdbool.h>
7273
#include <sphinxbase/cmd_ln.h>
7374
#include <sphinxbase/err.h>
7475
#include <sphinxbase/fe.h>
7576
#include <sphinxbase/feat.h>
7677
#include <sphinxbase/jsgf.h>
7778
#include <sphinxbase/ngram_model.h>
7879

79-
typedef int bool;
80-
#define false 0
81-
#define true 1
82-
8380
typedef cmd_ln_t Config;
8481
typedef jsgf_t Jsgf;
8582
typedef jsgf_rule_t JsgfRule;

0 commit comments

Comments
 (0)