summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--ext/syck/syck.c8
-rw-r--r--ext/syck/syck.h6
-rw-r--r--st.h1
4 files changed, 25 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c802f86e5e..0fb39d006f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Tue May 20 15:26:25 2003 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * st.h: define ST_DATA_T_DEFINED for portability.
+
+ * ext/syck/syck.h: add typedef, st_data_t for Ruby 1.6.
+
+ * ext/syck/syck.c (syck_st_free_nodes): return int.
+
+ * ext/syck/syck.c (syck_add_sym): cast the data to st_data_t
+ to avoid error on bcc32.
+
+ * ext/syck/syck.c (syck_lookup_sym): ditto.
+
+ * ext/syck/syck.c (syck_free_parser): NULL is not integer.
+
Tue May 20 13:29:04 2003 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (kill): set errno after calling raise().
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index 89aa804e44..068c1952cf 100644
--- a/ext/syck/syck.c
+++ b/ext/syck/syck.c
@@ -188,7 +188,7 @@ syck_add_sym( SyckParser *p, char *data )
p->syms = st_init_numtable();
}
id = p->syms->num_entries;
- st_insert( p->syms, id, data );
+ st_insert( p->syms, id, (st_data_t)data );
return id;
}
@@ -196,10 +196,10 @@ int
syck_lookup_sym( SyckParser *p, SYMID id, char **data )
{
if ( p->syms == NULL ) return 0;
- return st_lookup( p->syms, id, data );
+ return st_lookup( p->syms, id, (st_data_t *)data );
}
-enum st_retval
+int
syck_st_free_nodes( char *key, SyckNode *n, char *arg )
{
syck_free_node( n );
@@ -223,7 +223,7 @@ syck_free_parser( SyckParser *p )
//
// Free the anchor table
//
- st_foreach( p->anchors, syck_st_free_nodes, NULL );
+ st_foreach( p->anchors, syck_st_free_nodes, 0 );
st_free_table( p->anchors );
//
diff --git a/ext/syck/syck.h b/ext/syck/syck.h
index 6bba91bb54..6d10cab714 100644
--- a/ext/syck/syck.h
+++ b/ext/syck/syck.h
@@ -14,7 +14,7 @@
#define YAML_DOMAIN "yaml.org,2002"
#include <stdio.h>
-#include "../../st.h"
+#include "st.h"
#if defined(__cplusplus)
extern "C" {
@@ -257,6 +257,10 @@ long syck_seq_count( SyckNode * );
void apply_seq_in_map( SyckParser *, SyckNode * );
+#ifndef ST_DATA_T_DEFINED
+typedef long st_data_t;
+#endif
+
#if defined(__cplusplus)
} /* extern "C" { */
#endif
diff --git a/st.h b/st.h
index 888ca50e4f..eebb458712 100644
--- a/st.h
+++ b/st.h
@@ -7,6 +7,7 @@
#define ST_INCLUDED
typedef long st_data_t;
+#define ST_DATA_T_DEFINED
typedef struct st_table st_table;