forked from GitHub/gf-core
fix the type signatures for the linearizer callbacks
This commit is contained in:
@@ -142,14 +142,14 @@ pgf_aligner_lzn_symbol_token(PgfLinFuncs** funcs, PgfToken tok)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_aligner_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_aligner_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfAlignerLin* alin = gu_container(funcs, PgfAlignerLin, funcs);
|
PgfAlignerLin* alin = gu_container(funcs, PgfAlignerLin, funcs);
|
||||||
gu_buf_push(alin->parent_stack, int, fid);
|
gu_buf_push(alin->parent_stack, int, fid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_aligner_lzn_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_aligner_lzn_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfAlignerLin* alin = gu_container(funcs, PgfAlignerLin, funcs);
|
PgfAlignerLin* alin = gu_container(funcs, PgfAlignerLin, funcs);
|
||||||
gu_buf_pop(alin->parent_stack, int);
|
gu_buf_pop(alin->parent_stack, int);
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ pgf_bracket_lzn_symbol_token(PgfLinFuncs** funcs, PgfToken tok)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int linde
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_bracket_lzn_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_bracket_lzn_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
||||||
|
|
||||||
|
|||||||
@@ -731,7 +731,7 @@ found:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_lzr_cache_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lin_idx, PgfCId fun)
|
pgf_lzr_cache_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lin_idx, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfLzrCache* cache = gu_container(funcs, PgfLzrCache, funcs);
|
PgfLzrCache* cache = gu_container(funcs, PgfLzrCache, funcs);
|
||||||
PgfLzrCached* event = gu_buf_extend(cache->events);
|
PgfLzrCached* event = gu_buf_extend(cache->events);
|
||||||
@@ -743,7 +743,7 @@ pgf_lzr_cache_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lin_idx
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_lzr_cache_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lin_idx, PgfCId fun)
|
pgf_lzr_cache_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lin_idx, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfLzrCache* cache = gu_container(funcs, PgfLzrCache, funcs);
|
PgfLzrCache* cache = gu_container(funcs, PgfLzrCache, funcs);
|
||||||
PgfLzrCached* event = gu_buf_extend(cache->events);
|
PgfLzrCached* event = gu_buf_extend(cache->events);
|
||||||
|
|||||||
@@ -83,10 +83,10 @@ struct PgfLinFuncs
|
|||||||
void (*symbol_token)(PgfLinFuncs** self, PgfToken tok);
|
void (*symbol_token)(PgfLinFuncs** self, PgfToken tok);
|
||||||
|
|
||||||
/// Begin phrase
|
/// Begin phrase
|
||||||
void (*begin_phrase)(PgfLinFuncs** self, PgfCId cat, int fid, int lindex, PgfCId fun);
|
void (*begin_phrase)(PgfLinFuncs** self, PgfCId cat, int fid, size_t lindex, PgfCId fun);
|
||||||
|
|
||||||
/// End phrase
|
/// End phrase
|
||||||
void (*end_phrase)(PgfLinFuncs** self, PgfCId cat, int fid, int lindex, PgfCId fun);
|
void (*end_phrase)(PgfLinFuncs** self, PgfCId cat, int fid, size_t lindex, PgfCId fun);
|
||||||
|
|
||||||
/// handling nonExist
|
/// handling nonExist
|
||||||
void (*symbol_ne)(PgfLinFuncs** self);
|
void (*symbol_ne)(PgfLinFuncs** self);
|
||||||
|
|||||||
@@ -869,7 +869,7 @@ pgf_lookup_symbol_token(PgfLinFuncs** self, PgfToken token)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_lookup_begin_phrase(PgfLinFuncs** self, PgfCId cat, int fid, int lindex, PgfCId funname)
|
pgf_lookup_begin_phrase(PgfLinFuncs** self, PgfCId cat, int fid, size_t lindex, PgfCId funname)
|
||||||
{
|
{
|
||||||
PgfLookupState* st = gu_container(self, PgfLookupState, funcs);
|
PgfLookupState* st = gu_container(self, PgfLookupState, funcs);
|
||||||
|
|
||||||
@@ -883,7 +883,7 @@ pgf_lookup_begin_phrase(PgfLinFuncs** self, PgfCId cat, int fid, int lindex, Pgf
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_lookup_end_phrase(PgfLinFuncs** self, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_lookup_end_phrase(PgfLinFuncs** self, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfLookupState* st = gu_container(self, PgfLookupState, funcs);
|
PgfLookupState* st = gu_container(self, PgfLookupState, funcs);
|
||||||
st->curr_absfun = NULL;
|
st->curr_absfun = NULL;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
int start, end;
|
int start, end;
|
||||||
PgfCId cat;
|
PgfCId cat;
|
||||||
int lin_idx;
|
size_t lin_idx;
|
||||||
} PgfPhrase;
|
} PgfPhrase;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -46,14 +46,14 @@ pgf_metrics_lzn_symbol_token(PgfLinFuncs** funcs, PgfToken tok)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_metrics_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lin_index, PgfCId fun)
|
pgf_metrics_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lin_index, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfMetricsLznState* state = gu_container(funcs, PgfMetricsLznState, funcs);
|
PgfMetricsLznState* state = gu_container(funcs, PgfMetricsLznState, funcs);
|
||||||
gu_buf_push(state->marks, int, state->pos);
|
gu_buf_push(state->marks, int, state->pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_metrics_lzn_end_phrase1(PgfLinFuncs** funcs, PgfCId cat, int fid, int lin_idx, PgfCId fun)
|
pgf_metrics_lzn_end_phrase1(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lin_idx, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfMetricsLznState* state = gu_container(funcs, PgfMetricsLznState, funcs);
|
PgfMetricsLznState* state = gu_container(funcs, PgfMetricsLznState, funcs);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ pgf_metrics_symbol_bind(PgfLinFuncs** funcs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_metrics_lzn_end_phrase2(PgfLinFuncs** funcs, PgfCId cat, int fid, int lin_idx, PgfCId fun)
|
pgf_metrics_lzn_end_phrase2(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lin_idx, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfMetricsLznState* state = gu_container(funcs, PgfMetricsLznState, funcs);
|
PgfMetricsLznState* state = gu_container(funcs, PgfMetricsLznState, funcs);
|
||||||
|
|
||||||
|
|||||||
@@ -64,17 +64,17 @@ namespace PGFSharp
|
|||||||
stack.Peek ().AddChild (new StringChildBracket (str));
|
stack.Peek ().AddChild (new StringChildBracket (str));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BeginPhrase(IntPtr self, IntPtr cat, int fid, int lindex, IntPtr fun) {
|
private void BeginPhrase(IntPtr self, IntPtr cat, int fid, UIntPtr lindex, IntPtr fun) {
|
||||||
stack.Push (new Bracket ());
|
stack.Push (new Bracket ());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EndPhrase(IntPtr self, IntPtr cat, int fid, int lindex, IntPtr fun) {
|
private void EndPhrase(IntPtr self, IntPtr cat, int fid, UIntPtr lindex, IntPtr fun) {
|
||||||
var b = stack.Pop ();
|
var b = stack.Pop ();
|
||||||
|
|
||||||
b.CatName = Native.NativeString.StringFromNativeUtf8 (cat);
|
b.CatName = Native.NativeString.StringFromNativeUtf8 (cat);
|
||||||
b.FunName = Native.NativeString.StringFromNativeUtf8 (fun);
|
b.FunName = Native.NativeString.StringFromNativeUtf8 (fun);
|
||||||
b.FId = fid;
|
b.FId = fid;
|
||||||
b.LIndex = lindex;
|
b.LIndex = (int) lindex;
|
||||||
|
|
||||||
if (stack.Count == 0)
|
if (stack.Count == 0)
|
||||||
final = b;
|
final = b;
|
||||||
|
|||||||
@@ -207,10 +207,10 @@ namespace PGFSharp
|
|||||||
public delegate void LinFuncSymbolToken(IntPtr self, IntPtr token);
|
public delegate void LinFuncSymbolToken(IntPtr self, IntPtr token);
|
||||||
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public delegate void LinFuncBeginPhrase(IntPtr self, IntPtr cat, int fid, int lindex, IntPtr fun);
|
public delegate void LinFuncBeginPhrase(IntPtr self, IntPtr cat, int fid, UIntPtr lindex, IntPtr fun);
|
||||||
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public delegate void LinFuncEndPhrase(IntPtr self, IntPtr cat, int fid, int lindex, IntPtr fun);
|
public delegate void LinFuncEndPhrase(IntPtr self, IntPtr cat, int fid, UIntPtr lindex, IntPtr fun);
|
||||||
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public delegate void LinFuncSymbolNonexistant(IntPtr self);
|
public delegate void LinFuncSymbolNonexistant(IntPtr self);
|
||||||
|
|||||||
@@ -946,7 +946,7 @@ pgf_bracket_lzn_symbol_token(PgfLinFuncs** funcs, PgfToken tok)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
||||||
|
|
||||||
@@ -955,7 +955,7 @@ pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int linde
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_bracket_lzn_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_bracket_lzn_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
||||||
JNIEnv* env = state->env;
|
JNIEnv* env = state->env;
|
||||||
|
|||||||
@@ -2075,7 +2075,7 @@ pgf_bracket_lzn_symbol_token(PgfLinFuncs** funcs, PgfToken tok)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
||||||
|
|
||||||
@@ -2084,7 +2084,7 @@ pgf_bracket_lzn_begin_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int linde
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_bracket_lzn_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, int lindex, PgfCId fun)
|
pgf_bracket_lzn_end_phrase(PgfLinFuncs** funcs, PgfCId cat, int fid, size_t lindex, PgfCId fun)
|
||||||
{
|
{
|
||||||
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
PgfBracketLznState* state = gu_container(funcs, PgfBracketLznState, funcs);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user