ksss
8d15ef2e89
Use bool macro KHASH_DEFINE and KHASH_DECLARE
2014-04-02 13:38:43 +00:00
Yukihiro "Matz" Matsumoto
180b3d5678
change mrb_int to size_t that would take strlen()
2014-03-19 00:17:03 +09:00
Yukihiro "Matz" Matsumoto
c476c1b528
symbol length type to be mrb_int
2014-03-15 15:43:40 +09:00
ksss
58a5e832d9
fix sym_intern argument type
2014-03-11 09:12:56 +09:00
Yukihiro "Matz" Matsumoto
86a48b7c48
Merge pull request #1840 from ksss/bit-field
...
set bit field for mrb_bool
2014-03-10 22:24:36 +09:00
ksss
a53dd33eaa
set bool macro
2014-03-10 13:18:34 +00:00
ksss
49a048c544
set bit field for mrb_bool
2014-03-10 13:14:07 +00:00
ksss
4070b5987a
embed small string
...
use flags 4 for *this object is embed*
use flags 8~64 for *embed string length*
2014-03-06 13:12:08 +00:00
Yukihiro "Matz" Matsumoto
ebd976be84
initialize sname before interning
2014-02-25 10:43:16 +09:00
cremno
4507985c3e
use mrb_bool, FALSE and TRUE more
...
It doesn't matter to me if one is using FALSE/TRUE instead of 1/0
but I prefer a type (alias) which emphasizes boolean vars to int.
I changed 1/0 to FALSE/TRUE anyway.
2014-01-31 18:00:36 +01:00
cremno
aa655b9ee1
remove superfluous includes
...
- reduce compile time by a little bit (full-core: ~0.7s for me)
- thanks to 'include-what-you-use' for some help
- include Standard C header files before any other (coding style)
2014-01-07 17:56:30 +01:00
Yukihiro "Matz" Matsumoto
c6ceed22d9
rename mrb_intern_litral -> mrb_intern_static
2013-12-25 08:40:26 +09:00
Yukihiro "Matz" Matsumoto
bc7a6e88a1
zero copy C literal strings in symbol table
2013-12-24 08:27:42 +09:00
Yukihiro "Matz" Matsumoto
55ef024e83
Merge pull request #1615 from crimsonwoods/remove_strong_coupling_by_khash
...
Remove 'mrb_state' field from 'kh_xxx_t' structure.
2013-12-23 04:31:58 -08:00
crimsonwoods
370ad6fade
Remove 'mrb_state' field from 'kh_xxx_t' structure.
...
'kh_xxx_t' requires 'mrb_state' to allocate, free, and compute hash value.
But 'mrb_state' should not be held by 'kh_xxx_t' and 'mrb_state' should be
supplied from outside.
2013-12-23 00:33:07 -08:00
h2so5
a94be45546
change behavior of mrb_sym2str
2013-12-23 03:27:56 +09:00
Yukihiro "Matz" Matsumoto
9c6398a444
rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513
2013-11-29 08:47:28 +09:00
Yukihiro "Matz" Matsumoto
6b015ec775
define Class#new in ruby to call #initialize
2013-08-13 16:55:06 +09:00
Jun Hiroe
8e42868600
Repalace int with mrb_bool because a return value is boolean.
2013-07-15 23:17:12 +09:00
Jun Hiroe
883c45b931
Replace mrb_intern() func with mrb_intern2() func or mrb_intern_cstr() func.
2013-07-12 01:00:50 +09:00
Yukihiro "Matz" Matsumoto
5c68195c88
mrb_str_new_static(): zero copy string creation
2013-04-28 02:47:22 +09:00
Yukihiro "Matz" Matsumoto
e63b086f1e
rename mrb_interned API functions
2013-04-26 10:57:08 +09:00
Yukihiro "Matz" Matsumoto
c99b72b20d
Merge branch 'suppress_intern' of https://github.com/crimsonwoods/mruby into crimsonwoods-suppress_intern
2013-04-26 09:18:39 +09:00
crimsonwoods
bd1b925931
modify the type of return value (mrb_bool => mrb_value).
2013-04-25 09:51:20 +09:00
Yukihiro "Matz" Matsumoto
30d580ecbc
rename every ARGS_XXX to MRB_ARGS_XXX; ref #1206
2013-04-25 09:47:36 +09:00
crimsonwoods
8682b06953
add new functions to check if symbols are interned without registration.
2013-04-25 09:27:00 +09:00
Masaki Muranaka
2b5b161f8b
Sort include files. Some redundant includes are removed.
2013-03-29 10:22:31 +09:00
Yukihiro Matz Matsumoto
18b2683b97
use new mrb_format API from mrb_raisef; its only format specifier is "%S" (stringify) and takes mrb_value; close #1062
2013-03-27 23:41:23 +09:00
MATSUMOTO Ryosuke
7328b68b9f
Adjusted indent, space and tab
2013-03-24 11:35:42 +09:00
Masaki Muranaka
fc63ef150b
Add new API mrb_intern_cstr(). This is for naming orthogonality. mrb_intern is also left for backward compatibility.
2013-03-22 14:39:28 +09:00
Yukihiro Matz Matsumoto
d0d920e909
rename mrb_true_or_false_value() to mrb_bool_value()
2013-03-19 12:03:54 +09:00
Masaki Muranaka
6ab9c389c4
Use mrb_true_or_false_value() / in sym_equal().
2013-03-19 11:04:23 +09:00
Yuichiro MASUI
eff538c250
Removed unused expr
2013-03-18 01:12:52 +09:00
kano4
22756f45be
Fix indentation in symbol.c
2013-03-14 23:47:31 +09:00
Yukihiro Matz Matsumoto
93e9174c57
symbol length make size_t from mrb_int; cancel #993 monaka/pr-cleanup-symbol.c-20130312
2013-03-14 19:09:55 +09:00
Masaki Muranaka
48cc92b3c6
Use mrb_int as possible.
2013-03-12 23:54:55 +09:00
Masaki Muranaka
66c4859d6c
Copy to *lenp just in case lenp != NULL.
2013-03-12 23:54:14 +09:00
mattn
9d3a864a86
Skip end of loop in mrb_sym2name_len
2013-03-05 10:48:05 +09:00
Yukihiro Matz Matsumoto
e429905597
replace SYM2ID() by mrb_symbol()
2012-11-04 05:11:39 +09:00
Yukihiro Matsumoto
ac789ae61c
free symbol table from mrb_close()
2012-08-28 02:03:19 +09:00
Yukihiro Matsumoto
1ed39d5c05
use TRUE/FALSE instead of 1/0
2012-08-13 04:19:24 +09:00
Yukihiro Matsumoto
8af5a999bf
store :initialize in mrb structure
2012-08-08 00:25:35 +09:00
Max Anselm
5a4beeed2d
Make all(?) void casts explicit for C++
2012-07-29 19:48:48 -04:00
Masaki Muranaka
d73a54d80a
Use memcpy instead of strncpy
2012-07-23 10:18:11 +09:00
Junji Sawada
96366117ea
Remove unnecessary header inclusion
2012-07-14 11:39:25 +09:00
Yukihiro Matsumoto
bbec03bb7a
add missing (empty) default for swtch; close #364
2012-07-13 14:35:18 +09:00
Yukihiro Matsumoto
48c73ac630
less <stdio.h>
2012-07-13 10:13:47 +09:00
crimsonwoods
cd68190480
split declaration and definition for 'khash_xxx'.
2012-06-19 23:00:29 +09:00
Yukihiro Matsumoto
7744315d88
add Symbol#<=>
2012-06-19 16:50:02 +09:00
Yukihiro Matsumoto
0ef76fdbde
make init function consistent: mrb_init_symbols to mrb_init_symbol
2012-06-15 14:08:11 +09:00