git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implemented vector primitives in ruby wrapper
[swftools.git]
/
lib
/
q.c
diff --git
a/lib/q.c
b/lib/q.c
index
63794e0
..
67597df
100644
(file)
--- a/
lib/q.c
+++ b/
lib/q.c
@@
-374,7
+374,7
@@
static char _trie_put(trielayer_t**t, unsigned const char*id, void*data)
{
if(!*t) {
(*t) = rfx_calloc(sizeof(trielayer_t));
{
if(!*t) {
(*t) = rfx_calloc(sizeof(trielayer_t));
- (*t)->rest = (unsigned char*)strdup(id);
+ (*t)->rest = (unsigned char*)strdup((char*)id);
(*t)->data = data;
return 0;
}
(*t)->data = data;
return 0;
}
@@
-389,7
+389,7
@@
static char _trie_put(trielayer_t**t, unsigned const char*id, void*data)
char overwrite = 0;
if((*t)->rest)
overwrite = 1;
char overwrite = 0;
if((*t)->rest)
overwrite = 1;
- (*t)->rest = strdup("");
+ (*t)->rest = (unsigned char*)strdup("");
(*t)->data = data;
return overwrite;
}
(*t)->data = data;
return overwrite;
}
@@
-397,7
+397,7
@@
static char _trie_put(trielayer_t**t, unsigned const char*id, void*data)
static char _trie_remove(trielayer_t*t, unsigned const char*id)
{
while(t) {
static char _trie_remove(trielayer_t*t, unsigned const char*id)
{
while(t) {
- if(t->rest && !strcmp(t->rest, id)) {
+ if(t->rest && !strcmp((char*)t->rest, (char*)id)) {
free(t->rest);
t->rest = 0;
return 1;
free(t->rest);
t->rest = 0;
return 1;
@@
-443,7
+443,7
@@
int trie_contains(trie_t*trie, unsigned const char*id)
{
trielayer_t*t = trie->start;
while(t) {
{
trielayer_t*t = trie->start;
while(t) {
- if(t->rest && !strcmp(t->rest, id))
+ if(t->rest && !strcmp((char*)t->rest, (char*)id))
return 1;
if(!*id)
return 0;
return 1;
if(!*id)
return 0;
@@
-455,7
+455,7
@@
void* trie_lookup(trie_t*trie, unsigned const char*id)
{
trielayer_t*t = trie->start;
while(t) {
{
trielayer_t*t = trie->start;
while(t) {
- if(t->rest && !strcmp(t->rest, id))
+ if(t->rest && !strcmp((char*)t->rest, (char*)id))
return t->data;
if(!*id)
return 0;
return t->data;
if(!*id)
return 0;