Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yui-knk committed May 29, 2023
1 parent c12b7f8 commit f34df10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 6 additions & 3 deletions ruby_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ struct ruby_parser {
rb_parser_t *parser_params;
};


static void
parser_mark2(void *ptr)
{
Expand Down Expand Up @@ -957,7 +956,11 @@ rb_parser_set_yydebug(VALUE vparser, VALUE flag)
rb_ruby_parser_set_yydebug(parser->parser_params, RTEST(flag));
return flag;
}
#endif

#else

/* For "ISO C requires a translation unit to contain at least one declaration" */
#define RUBY_PARSER_C
void
rb_parser_dummy(void)
{}
#endif
10 changes: 4 additions & 6 deletions st2.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ extern "C" {
#endif
#endif

#include <stddef.h>
#include <stdint.h>
#include "ruby/config.h"
#include "ruby/defines.h"

RUBY_SYMBOL_EXPORT_BEGIN

#if SIZEOF_LONG == SIZEOF_VOIDP
typedef unsigned long st2_data_t;
Expand All @@ -25,7 +25,7 @@ typedef unsigned LONG_LONG st2_data_t;
#else
# error ---->> st.c requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
#endif
#define ST_DATA_T_DEFINED
#define ST2_DATA_T_DEFINED

#ifndef CHAR_BIT
# ifdef HAVE_LIMITS_H
Expand Down Expand Up @@ -103,8 +103,6 @@ struct st2_table {

enum st2_retval {ST2_CONTINUE, ST2_STOP, ST2_DELETE, ST2_CHECK, ST2_REPLACE};

RUBY_SYMBOL_EXPORT_BEGIN

size_t rb_st2_table_size(const struct st2_table *tbl);
st2_table *rb_st2_init_table(const struct st2_hash_type *, st_functions_t *);
st2_table *rb_st2_init_table_with_size(const struct st2_hash_type *, st_functions_t *, st2_index_t);
Expand Down

0 comments on commit f34df10

Please sign in to comment.