Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
e47f0fc0
Commit
e47f0fc0
authored
Sep 22, 2015
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2959 from sagmor/api-documentation
C API documentation
parents
73dc32c6
4c8205db
Changes
21
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
615 additions
and
150 deletions
+615
-150
include/mrbconf.h
include/mrbconf.h
+0
-11
include/mruby.h
include/mruby.h
+239
-35
include/mruby/array.h
include/mruby/array.h
+91
-7
include/mruby/class.h
include/mruby/class.h
+11
-6
include/mruby/common.h
include/mruby/common.h
+68
-0
include/mruby/compile.h
include/mruby/compile.h
+11
-6
include/mruby/data.h
include/mruby/data.h
+20
-6
include/mruby/debug.h
include/mruby/debug.h
+11
-6
include/mruby/dump.h
include/mruby/dump.h
+12
-8
include/mruby/error.h
include/mruby/error.h
+11
-6
include/mruby/gc.h
include/mruby/gc.h
+11
-6
include/mruby/hash.h
include/mruby/hash.h
+11
-6
include/mruby/irep.h
include/mruby/irep.h
+11
-7
include/mruby/khash.h
include/mruby/khash.h
+12
-7
include/mruby/numeric.h
include/mruby/numeric.h
+14
-6
include/mruby/proc.h
include/mruby/proc.h
+10
-6
include/mruby/range.h
include/mruby/range.h
+11
-6
include/mruby/string.h
include/mruby/string.h
+12
-7
include/mruby/value.h
include/mruby/value.h
+24
-2
include/mruby/variable.h
include/mruby/variable.h
+11
-6
include/mruby/version.h
include/mruby/version.h
+14
-0
No files found.
include/mrbconf.h
View file @
e47f0fc0
...
...
@@ -100,15 +100,4 @@
# define TRUE 1
#endif
#if defined(MRB_BUILD_AS_DLL)
#if defined(MRB_CORE) || defined(MRB_LIB)
#define MRB_API __declspec(dllexport)
#else
#define MRB_API __declspec(dllimport)
#endif
#else
#define MRB_API extern
#endif
#endif
/* MRUBYCONF_H */
include/mruby.h
View file @
e47f0fc0
This diff is collapsed.
Click to expand it.
include/mruby/array.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,16 @@
#ifndef MRUBY_ARRAY_H
#define MRUBY_ARRAY_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/array.h
* @defgroup mruby_array Array class
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
typedef
struct
mrb_shared_array
{
int
refcnt
;
...
...
@@ -41,15 +48,93 @@ struct RArray {
void
mrb_ary_decref
(
mrb_state
*
,
mrb_shared_array
*
);
MRB_API
void
mrb_ary_modify
(
mrb_state
*
,
struct
RArray
*
);
MRB_API
mrb_value
mrb_ary_new_capa
(
mrb_state
*
,
mrb_int
);
/**
* Initializes a new array.
*
* Equivalent to:
*
* Array.new
*
* @param mrb
* The MRuby state reference.
* @returns
* The initialized array
*/
MRB_API
mrb_value
mrb_ary_new
(
mrb_state
*
mrb
);
MRB_API
mrb_value
mrb_ary_new_from_values
(
mrb_state
*
mrb
,
mrb_int
size
,
const
mrb_value
*
vals
);
MRB_API
mrb_value
mrb_assoc_new
(
mrb_state
*
mrb
,
mrb_value
car
,
mrb_value
cdr
);
MRB_API
void
mrb_ary_concat
(
mrb_state
*
,
mrb_value
,
mrb_value
);
MRB_API
mrb_value
mrb_ary_splat
(
mrb_state
*
,
mrb_value
);
MRB_API
void
mrb_ary_push
(
mrb_state
*
,
mrb_value
,
mrb_value
);
/**
* Pushes value into array.
*
* Equivalent to:
*
* ary << value
*
* @param mrb
* The MRuby state reference.
* @param ary
* The array in which the value will be pushed
* @param value
* The value to be pushed into array
*/
MRB_API
void
mrb_ary_push
(
mrb_state
*
mrb
,
mrb_value
array
,
mrb_value
value
);
/**
* Pops the last element from the array.
*
* Equivalent to:
*
* ary.pop
*
* @param mrb
* The MRuby state reference.
* @param ary
* The array from which the value will be poped.
* @returns
* The poped value.
*/
MRB_API
mrb_value
mrb_ary_pop
(
mrb_state
*
mrb
,
mrb_value
ary
);
/**
* Returns a reference to an element of the array on the given index.
*
* Equivalent to:
*
* ary[n]
*
* @param mrb
* The MRuby state reference.
* @param ary
* The target array.
* @param n
* The array index being referenced
* @returns
* The referenced value.
*/
MRB_API
mrb_value
mrb_ary_ref
(
mrb_state
*
mrb
,
mrb_value
ary
,
mrb_int
n
);
/**
* Sets a value on an array at the given index
*
* Equivalent to:
*
* ary[n] = val
*
* @param mrb
* The MRuby state reference.
* @param ary
* The target array.
* @param n
* The array index being referenced.
* @param val
* The value being setted.
*/
MRB_API
void
mrb_ary_set
(
mrb_state
*
mrb
,
mrb_value
ary
,
mrb_int
n
,
mrb_value
val
);
MRB_API
void
mrb_ary_replace
(
mrb_state
*
mrb
,
mrb_value
a
,
mrb_value
b
);
MRB_API
mrb_value
mrb_check_array_type
(
mrb_state
*
mrb
,
mrb_value
self
);
MRB_API
mrb_value
mrb_ary_unshift
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_value
item
);
...
...
@@ -67,8 +152,7 @@ mrb_ary_len(mrb_state *mrb, mrb_value ary)
return
RARRAY_LEN
(
ary
);
}
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_ARRAY_H */
include/mruby/class.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,15 @@
#ifndef MRUBY_CLASS_H
#define MRUBY_CLASS_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/class.h
* @defgroup mruby_class Class class
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
struct
RClass
{
MRB_OBJECT_HEADER
;
...
...
@@ -81,8 +87,7 @@ void mrb_gc_mark_mt(mrb_state*, struct RClass*);
size_t
mrb_gc_mark_mt_size
(
mrb_state
*
,
struct
RClass
*
);
void
mrb_gc_free_mt
(
mrb_state
*
,
struct
RClass
*
);
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_CLASS_H */
include/mruby/common.h
0 → 100644
View file @
e47f0fc0
/*
** mruby/common.h - mruby common platform definitions
**
** See Copyright Notice in mruby.h
*/
#ifndef MRUBY_COMMON_H
#define MRUBY_COMMON_H
/**
* @file mruby/common.h
* @defgroup mruby_common Shared compiler macros
* @ingroup mruby
* @{
*/
#ifdef __cplusplus
# define MRB_BEGIN_DECL extern "C" {
# define MRB_END_DECL }
#else
/** Start declarations in C mode */
# define MRB_BEGIN_DECL
/** End declarations in C mode */
# define MRB_END_DECL
#endif
/** Declare a function that never returns. */
#if __STDC_VERSION__ >= 201112L
# define mrb_noreturn _Noreturn
#elif defined __GNUC__ && !defined __STRICT_ANSI__
# define mrb_noreturn __attribute__((noreturn))
#elif defined _MSC_VER
# define mrb_noreturn __declspec(noreturn)
#else
# define mrb_noreturn
#endif
/** Mark a function as deprecated. */
#if defined __GNUC__ && !defined __STRICT_ANSI__
# define mrb_deprecated __attribute__((deprecated))
#elif defined _MSC_VER
# define mrb_deprecated __declspec(deprecated)
#else
# define mrb_deprecated
#endif
/** Declare a function as always inlined. */
#if defined(_MSC_VER)
# define MRB_INLINE static __inline
#else
# define MRB_INLINE static inline
#endif
/** Declare a public MRuby API function. */
#if defined(MRB_BUILD_AS_DLL)
#if defined(MRB_CORE) || defined(MRB_LIB)
# define MRB_API __declspec(dllexport)
#else
# define MRB_API __declspec(dllimport)
#endif
#else
# define MRB_API extern
#endif
/** @} */
#endif
/* MRUBY_COMMON_H */
include/mruby/compile.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,15 @@
#ifndef MRUBY_COMPILE_H
#define MRUBY_COMPILE_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/compile.h
* @defgroup mruby_compile Compiler
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
#include "mruby.h"
...
...
@@ -183,8 +189,7 @@ MRB_API mrb_value mrb_load_file_cxt(mrb_state*,FILE*, mrbc_context *cxt);
MRB_API
mrb_value
mrb_load_string_cxt
(
mrb_state
*
mrb
,
const
char
*
s
,
mrbc_context
*
cxt
);
MRB_API
mrb_value
mrb_load_nstring_cxt
(
mrb_state
*
mrb
,
const
char
*
s
,
int
len
,
mrbc_context
*
cxt
);
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_COMPILE_H */
include/mruby/data.h
View file @
e47f0fc0
...
...
@@ -7,12 +7,27 @@
#ifndef MRUBY_DATA_H
#define MRUBY_DATA_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/data.h
* @defgroup mruby_data Custom C wrapped data.
*
* Defining Ruby wrappers around native objects.
*
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
/**
* Custom data type description.
*/
typedef
struct
mrb_data_type
{
/** data type name */
const
char
*
struct_name
;
/** data type release function pointer */
void
(
*
dfree
)(
mrb_state
*
mrb
,
void
*
);
}
mrb_data_type
;
...
...
@@ -59,8 +74,7 @@ mrb_data_init(mrb_value v, void *ptr, const mrb_data_type *type)
DATA_TYPE
(
v
)
=
type
;
}
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_DATA_H */
include/mruby/debug.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,15 @@
#ifndef MRUBY_DEBUG_H
#define MRUBY_DEBUG_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/debug.h
* @defgroup mruby_debug Debugging.
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
typedef
enum
mrb_debug_line_type
{
mrb_debug_line_ary
=
0
,
...
...
@@ -58,8 +64,7 @@ MRB_API mrb_irep_debug_info_file *mrb_debug_info_append_file(
MRB_API
mrb_irep_debug_info
*
mrb_debug_info_alloc
(
mrb_state
*
mrb
,
mrb_irep
*
irep
);
MRB_API
void
mrb_debug_info_free
(
mrb_state
*
mrb
,
mrb_irep_debug_info
*
d
);
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_DEBUG_H */
include/mruby/dump.h
View file @
e47f0fc0
...
...
@@ -7,12 +7,17 @@
#ifndef MRUBY_DUMP_H
#define MRUBY_DUMP_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby.h"
#include "mruby/irep.h"
#include "mruby/common.h"
/**
* @file mruby/dump.h
* @defgroup mruby_dump Dumping compiled mruby script.
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
#define DUMP_DEBUG_INFO 1
#define DUMP_ENDIAN_BIG 2
...
...
@@ -185,11 +190,10 @@ bin_to_uint8(const uint8_t *bin)
return
(
uint8_t
)
bin
[
0
];
}
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
/* crc.c */
/*
* @internal
crc.c */
uint16_t
calc_crc_16_ccitt
(
const
uint8_t
*
src
,
size_t
nbytes
,
uint16_t
crc
);
...
...
include/mruby/error.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,15 @@
#ifndef MRUBY_ERROR_H
#define MRUBY_ERROR_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/error.h
* @defgroup mruby_error Error handling.
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
struct
RException
{
MRB_OBJECT_HEADER
;
...
...
@@ -39,8 +45,7 @@ MRB_API mrb_value mrb_rescue_exceptions(mrb_state *mrb, mrb_func_t body, mrb_val
mrb_func_t
rescue
,
mrb_value
r_data
,
mrb_int
len
,
struct
RClass
**
classes
);
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_ERROR_H */
include/mruby/gc.h
View file @
e47f0fc0
...
...
@@ -7,16 +7,21 @@
#ifndef MRUBY_GC_H
#define MRUBY_GC_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/gc.h
* @defgroup mruby_gc Uncommon memory management stuffs.
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
typedef
void
(
mrb_each_object_callback
)(
mrb_state
*
mrb
,
struct
RBasic
*
obj
,
void
*
data
);
void
mrb_objspace_each_objects
(
mrb_state
*
mrb
,
mrb_each_object_callback
*
callback
,
void
*
data
);
MRB_API
void
mrb_free_context
(
mrb_state
*
mrb
,
struct
mrb_context
*
c
);
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_GC_H */
include/mruby/hash.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,15 @@
#ifndef MRUBY_HASH_H
#define MRUBY_HASH_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/hash.h
* @defgroup mruby_hash Hash class
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
struct
RHash
{
MRB_OBJECT_HEADER
;
...
...
@@ -47,8 +53,7 @@ void mrb_gc_mark_hash(mrb_state*, struct RHash*);
size_t
mrb_gc_mark_hash_size
(
mrb_state
*
,
struct
RHash
*
);
void
mrb_gc_free_hash
(
mrb_state
*
,
struct
RHash
*
);
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_HASH_H */
include/mruby/irep.h
View file @
e47f0fc0
...
...
@@ -7,12 +7,17 @@
#ifndef MRUBY_IREP_H
#define MRUBY_IREP_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
#include "mruby/compile.h"
/**
* @file mruby/irep.h
* @defgroup mruby_irep Compiled mruby scripts.
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
enum
irep_pool_type
{
IREP_TT_STRING
,
IREP_TT_FIXNUM
,
...
...
@@ -53,8 +58,7 @@ void mrb_irep_free(mrb_state*, struct mrb_irep*);
void
mrb_irep_incref
(
mrb_state
*
,
struct
mrb_irep
*
);
void
mrb_irep_decref
(
mrb_state
*
,
struct
mrb_irep
*
);
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_IREP_H */
include/mruby/khash.h
View file @
e47f0fc0
...
...
@@ -7,12 +7,18 @@
#ifndef MRUBY_KHASH_H
#define MRUBY_KHASH_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include <string.h>
#include "mruby.h"
#include <string.h>
#include "mruby/common.h"
/**
* @file mruby/khash.h
* @defgroup mruby_khash khash definitions used in mruby's hash table.
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
typedef
uint32_t
khint_t
;
typedef
khint_t
khiter_t
;
...
...
@@ -266,8 +272,7 @@ static inline khint_t __ac_X31_hash_string(const char *s)
typedef
const
char
*
kh_cstr_t
;
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_KHASH_H */
include/mruby/numeric.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,18 @@
#ifndef MRUBY_NUMERIC_H
#define MRUBY_NUMERIC_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/numeric.h
* @defgroup mruby_numeric Numeric class and it's sub-classes.
*
* Numeric, Integer, Float, Fixnum classes
*
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
#define POSFIXABLE(f) ((f) <= MRB_INT_MAX)
#define NEGFIXABLE(f) ((f) >= MRB_INT_MIN)
...
...
@@ -104,8 +113,7 @@ mrb_int_sub_overflow(mrb_int minuend, mrb_int subtrahend, mrb_int *difference)
#undef MRB_UINT_MAKE
#undef MRB_UINT_MAKE2
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_NUMERIC_H */
include/mruby/proc.h
View file @
e47f0fc0
...
...
@@ -7,11 +7,16 @@
#ifndef MRUBY_PROC_H
#define MRUBY_PROC_H
#include "mruby/common.h"
#include "mruby/irep.h"
#if defined(__cplusplus)
extern
"C"
{
#endif
/**
* @file mruby/proc.h
* @defgroup mruby_proc Proc class
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
struct
REnv
{
MRB_OBJECT_HEADER
;
...
...
@@ -69,8 +74,7 @@ MRB_API mrb_value mrb_proc_cfunc_env_get(mrb_state*, mrb_int);
#include "mruby/khash.h"
KHASH_DECLARE
(
mt
,
mrb_sym
,
struct
RProc
*
,
TRUE
)
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_PROC_H */
include/mruby/range.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,15 @@
#ifndef MRUBY_RANGE_H
#define MRUBY_RANGE_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/range.h
* @defgroup mruby_range Range class
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
typedef
struct
mrb_range_edges
{
mrb_value
beg
;
...
...
@@ -29,8 +35,7 @@ MRB_API mrb_value mrb_range_new(mrb_state*, mrb_value, mrb_value, mrb_bool);
MRB_API
mrb_bool
mrb_range_beg_len
(
mrb_state
*
mrb
,
mrb_value
range
,
mrb_int
*
begp
,
mrb_int
*
lenp
,
mrb_int
len
);
mrb_value
mrb_get_values_at
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_int
olen
,
mrb_int
argc
,
const
mrb_value
*
argv
,
mrb_value
(
*
func
)(
mrb_state
*
,
mrb_value
,
mrb_int
));
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_RANGE_H */
include/mruby/string.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,15 @@
#ifndef MRUBY_STRING_H
#define MRUBY_STRING_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/string.h
* @defgroup mrb_string String class
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
extern
const
char
mrb_digitmap
[];
...
...
@@ -120,8 +126,7 @@ void mrb_regexp_check(mrb_state *mrb, mrb_value obj);
#define mrb_str_buf_cat(mrb, str, ptr, len) mrb_str_cat(mrb, str, ptr, len)
#define mrb_str_buf_append(mrb, str, str2) mrb_str_cat_str(mrb, str, str2)
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_STRING_H */
include/mruby/value.h
View file @
e47f0fc0
...
...
@@ -7,6 +7,19 @@
#ifndef MRUBY_VALUE_H
#define MRUBY_VALUE_H
#include "mruby/common.h"
/**
* @file mruby/value.h
* @defgroup mruby_value Value definitions
*
* @ref mrb_value functions and macros.
*
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
typedef
uint32_t
mrb_sym
;
typedef
uint8_t
mrb_bool
;
struct
mrb_state
;
...
...
@@ -163,8 +176,14 @@ mrb_obj_value(void *p)
return
v
;
}
static
inline
mrb_value
mrb_nil_value
(
void
)
/**
* Get a nil mrb_value object.
*
* @return
* nil mrb_value object reference.
*/
MRB_INLINE
mrb_value
mrb_nil_value
(
void
)
{
mrb_value
v
;
SET_NIL_VALUE
(
v
);
...
...
@@ -226,4 +245,7 @@ mrb_ro_data_p(const char *p)
# define mrb_ro_data_p(p) FALSE
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_VALUE_H */
include/mruby/variable.h
View file @
e47f0fc0
...
...
@@ -7,9 +7,15 @@
#ifndef MRUBY_VARIABLE_H
#define MRUBY_VARIABLE_H
#if defined(__cplusplus)
extern
"C"
{
#endif
#include "mruby/common.h"
/**
* @file mruby/variable.h
* @defgroup mruby_variable Functions to access to mruby variables.
* @ingroup mruby
* @{
*/
MRB_BEGIN_DECL
typedef
struct
global_variable
{
int
counter
;
...
...
@@ -74,8 +80,7 @@ void mrb_gc_mark_iv(mrb_state*, struct RObject*);
size_t
mrb_gc_mark_iv_size
(
mrb_state
*
,
struct
RObject
*
);
void
mrb_gc_free_iv
(
mrb_state
*
,
struct
RObject
*
);
#if defined(__cplusplus)
}
/* extern "C" { */
#endif
/** @} */
MRB_END_DECL
#endif
/* MRUBY_VARIABLE_H */
include/mruby/version.h
View file @
e47f0fc0
...
...
@@ -7,6 +7,17 @@
#ifndef MRUBY_VERSION_H
#define MRUBY_VERSION_H
#include "mruby/common.h"
/**
* @file mruby/version.h
* @brief MRuby version macros
* @defgroup mrb_string MRuby version macros
* @ingroup MRuby
* @{
*/
MRB_BEGIN_DECL
#define MRB_STRINGIZE0(expr) #expr
#define MRB_STRINGIZE(expr) MRB_STRINGIZE0(expr)
...
...
@@ -39,4 +50,7 @@
MRB_STRINGIZE(MRUBY_RELEASE_YEAR)" " \
MRUBY_AUTHOR \
/** @} */
MRB_END_DECL
#endif
/* MRUBY_VERSION_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment