skandhas
1a528da40b
add mrb_check_hash_type
2013-01-10 17:02:41 +08:00
Ryunosuke SATO
ee0563823d
Stop warning: extra ';' outside of a function
2012-11-30 22:43:53 +09:00
Yukihiro Matz Matsumoto
3eeef30618
make mrb_hash_keys() non static function
2012-11-14 14:42:21 +09:00
Yukihiro Matz Matsumoto
d2d2e9f5f9
add new predicates mrb_string_p(),mrb_array_p(),mrb_hash_p()
2012-11-04 05:02:39 +09:00
Yukihiro Matsumoto
18fbe4d0b7
do not touch h from Hash when h might be NULL
2012-10-23 14:16:14 +09:00
Masamitsu MURASE
42fa994e9b
Publish mrb_hash_delete_key.
2012-08-26 04:17:56 +09:00
Masaki Muranaka
22b032fcdf
mrb_hash_delete_key(), mrb_hash_keys() : Declare as static.
...
mrb_check_hash_type(): Remove as no implementation.
2012-07-29 20:11:43 +09:00
Masaki Muranaka
b2fc62f3a9
Remove commented out code.
2012-07-29 15:25:14 +09:00
Masamitsu MURASE
b48cfea736
Protect deleted key and value from GC.
2012-07-28 21:10:57 +09:00
Junji Sawada
96366117ea
Remove unnecessary header inclusion
2012-07-14 11:39:25 +09:00
Yukihiro Matsumoto
48c73ac630
less <stdio.h>
2012-07-13 10:13:47 +09:00
Yukihiro Matsumoto
0a88499f32
sizeof("a") is bigger by one than strlen("a")
2012-06-27 15:19:40 +09:00
Yukihiro Matsumoto
f045e64675
reduce calling mrb_str_new_cstr() to avoid strlen(); #301
2012-06-23 13:51:50 +09:00
Yukihiro Matsumoto
766ae4ee5f
dislose mrb_hash_keys; close #304
2012-06-21 16:27:16 +09:00
Yukihiro Matsumoto
a70c4e0c79
reduce calling of strlen(); #301
2012-06-21 16:22:29 +09:00
crimsonwoods
cd68190480
split declaration and definition for 'khash_xxx'.
2012-06-19 23:00:29 +09:00
Masaki Muranaka
f564ec7e82
Remove some redundant code.
2012-06-15 00:56:00 +09:00
Yukihiro Matsumoto
cc86250297
remove unsafe macros in hash.h
2012-06-03 00:23:59 +09:00
Yukihiro Matsumoto
ecbaf9cd99
simpler implementation of Hash#empty?
2012-06-02 23:52:32 +09:00
Yukihiro Matsumoto
8d0cc57a43
hash->ht might be NULL; it shouldn't though
2012-06-02 23:50:34 +09:00
Yukihiro Matsumoto
090e896d48
hash->ht might be NULL; it shouldn't though
2012-06-02 23:46:30 +09:00
Yukihiro Matsumoto
110cdd82e0
naming convention consistency for hash.h
2012-06-02 21:47:27 +09:00
Yukihiro Matsumoto
de133c3715
refactoring around mrb_hash_new
2012-06-02 21:42:52 +09:00
Yukihiro Matsumoto
9b9b345697
remove unnecessary header inclusion from hash.c
2012-06-01 02:45:23 +09:00
Yukihiro Matsumoto
b7d5ccdb36
small refactoring; hash->ht should not be NULL
2012-06-01 02:30:54 +09:00
Yukihiro Matsumoto
1321a157c2
values need not to dup unlike keys
2012-06-01 02:28:21 +09:00
Yukihiro Matsumoto
2a6b5b8ff5
stop using mrb_exec_recursive_paired() from Hash#==
2012-06-01 01:40:12 +09:00
Yukihiro Matsumoto
6caeb8f8fb
hash function should use #eql? internally
2012-06-01 01:30:44 +09:00
Yukihiro Matsumoto
6a2cf46ff9
hash function should use #hash internally
2012-06-01 01:25:16 +09:00
Yukihiro Matsumoto
3c80a5e2bf
add inline to KHASH_INIT functions
2012-06-01 01:18:20 +09:00
Yukihiro Matsumoto
7cf607bb75
stop duping values from Hash#values
2012-05-30 16:25:22 +09:00
Yukihiro Matsumoto
a4a48e3da1
specify allocating array size for Hash#values
2012-05-30 16:12:32 +09:00
Yukihiro Matsumoto
b275be253d
Hash#keys stop duping keys
2012-05-28 12:24:31 +09:00
Yukihiro Matsumoto
ad9e841c53
made mrb_get_args() better (optinal args, type checks); close #173 #176
2012-05-24 01:09:36 +09:00
Yukihiro Matsumoto
4523bee953
cast style consistency
2012-05-23 03:31:55 +09:00
Mitchell Blank Jr
9e336b00e5
More C++ compilability work: mrb_obj_alloc void* conversions
...
One of the biggest set of changes needed to make C++ compile, is that you
can't autoconvert "void*" to a different pointer type without a cast (you
can of course, convert pointers *to* "void*"!)
For the first part, convert the users of "mrb_obj_alloc". Since it has
to return something, make it RBasic* (that's what mrb_obj_alloc() is
operating on anyway). This way, even in C you'll get a warning if you
don't cast it.
For places where there are a lot of similar calls to mrb_obj_alloc(),
this can be easily hidden through a macro. I did this in string.c:
#define mrb_obj_alloc_string(mrb) ((struct RString *) mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))
I also updated the mrb_object() macro to also return a RBasic* -- my
previous commit changed that from "void*" -> "RObject*", but I figure
it should be consistent with mrb_obj_alloc()
2012-05-20 09:43:14 -07:00
Yukihiro "Matz" Matsumoto
ac31b58fe8
Merge pull request #169 from mitchblank/cplusplus
...
Part 1 of C++ compilability
2012-05-20 06:09:31 -07:00
Yukihiro Matsumoto
ee72000161
use mrb_assoc_new to generate a key-value pair
2012-05-20 22:05:49 +09:00
Mitchell Blank Jr
d9529f198d
fix mrb_gc_mark_ht_size() and mrb_gc_free_ht() types
...
mrb_gc_mark_ht_size() and mrb_gc_free_ht() were declared in gc.h as
taking a "RHash *" argument, but then they were defined in hash.c
as taking a "RClass *" Get these in sync.
2012-05-19 23:33:01 -07:00
Daniel Bovensiepen
e1e072b800
Fix Hash#shift return value from Hash to Array
2012-05-20 13:18:34 +08:00
Yukihiro Matsumoto
da9e8cebe0
remove __APPLE__
2012-05-09 12:07:29 +09:00
Yukihiro Matsumoto
f4cf8ea423
partial VC support
2012-05-09 08:49:38 +09:00
Yukihiro Matsumoto
b0e94d8c14
Time class available; based on code from @beoran; sorry for jumbo patch
2012-05-06 00:52:22 +09:00
Yukihiro Matsumoto
803dcb512e
more hash refactored
2012-05-05 09:03:16 +09:00
Yukihiro Matsumoto
e0460c1157
hash refactored
2012-05-05 08:55:58 +09:00
roco
4ec6d41f16
rm whitespace
2012-04-30 14:29:19 -07:00
Patrick Hogan
a408ba2dd6
Remove unused ret argument from kh_put.
...
It doesn't appear to serve any purpose and allows removing warning about various unused variables littered around.
Signed-off-by: Patrick Hogan <pbhogan@gmail.com >
2012-04-26 08:36:32 -05:00
Patrick Hogan
132dd25528
Remove a bunch of unused variables.
...
Removed or commented out to stop compiler whining about them.
Signed-off-by: Patrick Hogan <pbhogan@gmail.com >
2012-04-26 08:36:32 -05:00
Yukihiro Matsumoto
8b367098ac
move header files {irep,dump,cdump,ritehash}.h to /include/mruby
2012-04-24 17:41:28 +09:00
mimaki
835443614d
add file header
2012-04-23 11:46:16 +09:00