mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #1101 from monaka/pr-cleanup-includes
Cleanup includes
This commit is contained in:
+8
-8
@@ -111,14 +111,6 @@ typedef short mrb_sym;
|
||||
#define DISABLE_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
# define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# include <float.h>
|
||||
# define inline __inline
|
||||
@@ -154,4 +146,12 @@ typedef _Bool mrb_bool;
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
# define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE 1
|
||||
#endif
|
||||
|
||||
#endif /* MRUBYCONF_H */
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#define POSFIXABLE(f) ((f) <= MRB_INT_MAX)
|
||||
#define NEGFIXABLE(f) ((f) >= MRB_INT_MIN)
|
||||
#define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <limits.h>
|
||||
#include "mruby.h"
|
||||
#include "mruby/numeric.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "mruby.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "mruby/string.h"
|
||||
|
||||
+7
-7
@@ -4,18 +4,18 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
/* Some versions of VC++
|
||||
* has SIZE_MAX in stdint.h
|
||||
*/
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include <string.h>
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/string.h"
|
||||
#include "value_array.h"
|
||||
|
||||
/* SIZE_MAX is not supported by VC++. */
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t)-1)
|
||||
#endif
|
||||
|
||||
#define ARY_DEFAULT_LEN 4
|
||||
#define ARY_SHRINK_RATIO 5 /* must be larger than 2 */
|
||||
#define ARY_C_MAX_SIZE (SIZE_MAX / sizeof(mrb_value))
|
||||
|
||||
+2
-3
@@ -7,13 +7,12 @@
|
||||
#include "mruby.h"
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "mruby/array.h"
|
||||
#include "error.h"
|
||||
|
||||
KHASH_DEFINE(mt, mrb_sym, struct RProc*, 1, kh_int_hash_func, kh_int_hash_equal)
|
||||
|
||||
+9
-9
@@ -4,16 +4,16 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/irep.h"
|
||||
#include "mruby/compile.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "opcode.h"
|
||||
#include "node.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "mruby.h"
|
||||
#include "mruby/compile.h"
|
||||
#include "mruby/irep.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "mruby/string.h"
|
||||
#include "node.h"
|
||||
#include "opcode.h"
|
||||
#include "re.h"
|
||||
|
||||
typedef mrb_ast_node node;
|
||||
|
||||
+6
-6
@@ -4,19 +4,19 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include <errno.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
#include <string.h>
|
||||
#include "error.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/irep.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "error.h"
|
||||
|
||||
mrb_value
|
||||
mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, long len)
|
||||
|
||||
@@ -4,20 +4,22 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/hash.h"
|
||||
#include "mruby/range.h"
|
||||
#include <string.h>
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/data.h"
|
||||
#include "mruby/variable.h"
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#include <limits.h> // for SIZE_MAX
|
||||
/* Some versions of VC++
|
||||
* has SIZE_MAX in stdint.h
|
||||
*/
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/data.h"
|
||||
#include "mruby/hash.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/range.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/variable.h"
|
||||
|
||||
/*
|
||||
= Tri-color Incremental Garbage Collection
|
||||
|
||||
+2
-2
@@ -5,10 +5,10 @@
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/hash.h"
|
||||
#include "mruby/khash.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/variable.h"
|
||||
|
||||
|
||||
+2
-2
@@ -5,10 +5,10 @@
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "error.h"
|
||||
|
||||
|
||||
+8
-3
@@ -4,13 +4,18 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
/* Some versions of VC++
|
||||
* has SIZE_MAX in stdint.h
|
||||
*/
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "mruby/dump.h"
|
||||
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/irep.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/string.h"
|
||||
|
||||
#ifdef ENABLE_STDIO
|
||||
typedef struct _RiteFILE
|
||||
|
||||
+13
-14
@@ -4,23 +4,22 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/array.h"
|
||||
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
#include <float.h>
|
||||
#if defined(__FreeBSD__) && __FreeBSD__ < 4
|
||||
# include <floatingpoint.h>
|
||||
#endif
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
# include <ieeefp.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(__FreeBSD__) && __FreeBSD__ < 4
|
||||
#include <floatingpoint.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "mruby/string.h"
|
||||
|
||||
#ifdef MRB_USE_FLOAT
|
||||
#define floor(f) floorf(f)
|
||||
|
||||
+1
-1
@@ -5,9 +5,9 @@
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "mruby/string.h"
|
||||
#include "error.h"
|
||||
|
||||
int
|
||||
|
||||
+4
-5
@@ -17,16 +17,15 @@
|
||||
#define YYFREE(o) mrb_free(p->mrb, (o))
|
||||
#define YYSTACK_USE_ALLOCA 0
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "mruby.h"
|
||||
#include "mruby/compile.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "node.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define YYLEX_PARAM p
|
||||
|
||||
typedef mrb_ast_node node;
|
||||
|
||||
+1
-1
@@ -4,9 +4,9 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include "mruby.h"
|
||||
|
||||
/* configuration section */
|
||||
/* allocated memory address should be multiple of POOL_ALIGNMENT */
|
||||
|
||||
+1
-1
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "opcode.h"
|
||||
|
||||
static mrb_code call_iseq[] = {
|
||||
|
||||
+4
-4
@@ -4,12 +4,12 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/irep.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "mruby/class.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "mruby.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/irep.h"
|
||||
#include "mruby/variable.h"
|
||||
|
||||
void mrb_init_heap(mrb_state*);
|
||||
void mrb_init_core(mrb_state*);
|
||||
|
||||
+10
-7
@@ -4,19 +4,22 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#ifndef SIZE_MAX
|
||||
/* Some versions of VC++
|
||||
* has SIZE_MAX in stdint.h
|
||||
*/
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/class.h"
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include "mruby/range.h"
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "mruby/range.h"
|
||||
#include "mruby/string.h"
|
||||
#include "re.h"
|
||||
|
||||
const char mrb_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
+4
-5
@@ -4,13 +4,12 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/khash.h"
|
||||
#include <string.h>
|
||||
|
||||
#include "mruby/string.h"
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include "mruby.h"
|
||||
#include "mruby/khash.h"
|
||||
#include "mruby/string.h"
|
||||
|
||||
/* ------------------------------------------------------ */
|
||||
typedef struct symbol_name {
|
||||
|
||||
+3
-3
@@ -5,12 +5,12 @@
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "error.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/proc.h"
|
||||
|
||||
typedef int (iv_foreach_func)(mrb_state*,mrb_sym,mrb_value,void*);
|
||||
|
||||
|
||||
@@ -4,24 +4,24 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include "mruby.h"
|
||||
#include "opcode.h"
|
||||
#include "mruby/irep.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/hash.h"
|
||||
#include "mruby/range.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "error.h"
|
||||
#include "value_array.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <setjmp.h>
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/hash.h"
|
||||
#include "mruby/irep.h"
|
||||
#include "mruby/numeric.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/range.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "error.h"
|
||||
#include "opcode.h"
|
||||
#include "value_array.h"
|
||||
|
||||
|
||||
#define SET_TRUE_VALUE(r) MRB_SET_VALUE(r, MRB_TT_TRUE, value.i, 1)
|
||||
#define SET_FALSE_VALUE(r) MRB_SET_VALUE(r, MRB_TT_FALSE, value.i, 1)
|
||||
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
#include "mruby.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/dump.h"
|
||||
#include "mruby/compile.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "mruby.h"
|
||||
#include "mruby/compile.h"
|
||||
#include "mruby/dump.h"
|
||||
#include "mruby/proc.h"
|
||||
|
||||
#define RITEBIN_EXT ".mrb"
|
||||
#define C_EXT ".c"
|
||||
|
||||
Reference in New Issue
Block a user