nobu
ad48d99876
dbm: typed data
...
* ext/dbm/dbm.c (dbm_type): turn into typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-04 23:33:01 +00:00
hsbt
3caee48434
* ext/dbm/dbm.c: fix wrong arguments in GetDBM2 macro by @v2e4lisp.
...
[fix GH-655]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-13 08:29:09 +00:00
normal
fd61a78303
use do/while(0) around GetDBM macros
...
* README.EXT: wrap GetDBM with do/while(0)
* README.EXT.ja: ditto
* ext/dbm/dbm.c: ditto, likewise for GetDBM2
* ext/gdbm/gdbm.c: ditto
* ext/sdbm/init.c: ditto
[ruby-core:61217]
ref: http://c-faq.com/cpp/multistmt.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 22:50:31 +00:00
nobu
e4518c5bde
dbm.c: yield dup of keystr
...
* ext/dbm/dbm.c (fdbm_fetch): yield dup of keystr, to make it shared
and get rid of use of uninitialized variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 18:43:13 +00:00
nobu
7566c49068
ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLIST
...
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
argument list of rb_block_call_func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 07:59:14 +00:00
zzak
8015397318
* ext/dbm/dbm.c: [DOC] Fix wrong constant name in DBM by @edward
...
[Fixes GH-409] https://github.com/ruby/ruby/pull/409
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-04 10:56:27 +00:00
zzak
d075c430cb
* ext/dbm/extconf.rb: [DOC] Hide from RDoc
...
Some libraries might want to document extconf.rb so RDoc treats it
like any other ruby program. However, DBM users shouldn't care about
these methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12 03:59:50 +00:00
zzak
eadb8b5897
* ext/dbm/dbm.c: [DOC] Reformat headings of DBM class
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12 03:54:32 +00:00
shugo
1f828497d1
* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentError
...
when $SAFE is set to 4. $SAFE=4 is now obsolete.
[ruby-core:55222] [Feature #8468 ]
* object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust):
Kernel#untrusted?, untrust, and trust are now deprecated.
Their behavior is same as tainted?, taint, and untaint,
respectively.
* include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED()
and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(),
respectively.
* array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c,
ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c,
ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c,
ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c,
ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c,
ext/socket/socket.c, ext/socket/udpsocket.c,
ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c,
ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c,
load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c,
safe.c, string.c, thread.c, transcode.c, variable.c,
vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for
$SAFE=4.
* test/dl/test_dl2.rb, test/erb/test_erb.rb,
test/readline/test_readline.rb,
test/readline/test_readline_history.rb, test/ruby/test_alias.rb,
test/ruby/test_array.rb, test/ruby/test_dir.rb,
test/ruby/test_encoding.rb, test/ruby/test_env.rb,
test/ruby/test_eval.rb, test/ruby/test_exception.rb,
test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb,
test/ruby/test_io.rb, test/ruby/test_method.rb,
test/ruby/test_module.rb, test/ruby/test_object.rb,
test/ruby/test_pack.rb, test/ruby/test_rand.rb,
test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb,
test/ruby/test_struct.rb, test/ruby/test_thread.rb,
test/ruby/test_time.rb: remove tests for $SAFE=4.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 14:20:51 +00:00
akr
d07439d5fd
Add a comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-23 13:49:10 +00:00
zzak
3a7a773aeb
* ext/socket/option.c: Document synonymous methods, by windwiny [GH-277]
...
* ext/stringio/stringio.c: ditto
* ext/io/wait/wait.c: ditto
* ext/gdbm/gdbm.c: ditto
* ext/dl/cfunc.c: ditto
* ext/zlib/zlib.c: ditto
* ext/win32ole/win32ole.c: ditto
* ext/dbm/dbm.c: ditto
* ext/json/generator/generator.c: ditto
* ext/date/date_core.c: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-16 03:25:50 +00:00
akr
b47138580c
* lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,
...
ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile.
* ext/-test-/old_thread_select/depend: Update dependencies.
* ext/-test-/wait_for_single_fd/depend: Ditto.
* ext/bigdecimal/depend: Ditto.
* ext/curses/depend: Ditto.
* ext/digest/bubblebabble/depend: Ditto.
* ext/digest/depend: Ditto.
* ext/digest/md5/depend: Ditto.
* ext/digest/rmd160/depend: Ditto.
* ext/digest/sha1/depend: Ditto.
* ext/digest/sha2/depend: Ditto.
* ext/dl/callback/depend: Ditto.
* ext/dl/depend: Ditto.
* ext/etc/depend: Ditto.
* ext/nkf/depend: Ditto.
* ext/objspace/depend: Ditto.
* ext/pty/depend: Ditto.
* ext/readline/depend: Ditto.
* ext/ripper/depend: Ditto.
* ext/sdbm/depend: Ditto.
* ext/socket/depend: Ditto.
* ext/stringio/depend: Ditto.
* ext/strscan/depend: Ditto.
* ext/syslog/depend: Ditto.
* ext/-test-/num2int/depend: Removed.
* ext/dbm/depend: Ditto.
* ext/fcntl/depend: Ditto.
* ext/gdbm/depend: Ditto.
* ext/racc/cparse/depend: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13 00:46:29 +00:00
nobu
af6c038b23
remove trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-04 00:57:31 +00:00
naruse
7624e5d36c
* ext/dbm/dbm.c (fdbm_empty_p): fix wrong condtion introduced in r36438.
...
* ext/sdbm/init.c (fsdbm_empty_p): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 14:09:59 +00:00
nobu
f9c014d008
empty_p: optimize and warnings
...
* ext/dbm/dbm.c (fdbm_empty_p): not empty if first key exists.
suppress warnngs by gcc 4.7 -Wstrict-overflow.
* ext/sdbm/init.c (fsdbm_empty_p): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 07:44:17 +00:00
nobu
80429eed63
* io.c, process.c, time.c, ext: use rb_sys_fail_str instead of
...
rb_sys_fail.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-27 01:50:27 +00:00
akr
a38958a521
* ext/dbm/extconf.rb (headers): try ambiguous headers at last.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25 08:42:00 +00:00
akr
9056098516
update comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25 07:26:22 +00:00
akr
d9adb03dd9
* ext/curses/curses.c (Init_curses): use rb_define_const once for
...
Curses::VERSION.
* ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25 02:09:22 +00:00
akr
aa281e7517
* ext/curses/curses.c (Init_curses): make Curses::VERSION
...
understandable without context.
* ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25 01:36:33 +00:00
akr
cd390b1ec5
* ext/dbm/extconf.rb: unused macro removed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-23 14:02:01 +00:00
akr
fd2e0e3dac
* ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of
...
Berkeley DB.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-23 03:23:40 +00:00
akr
8963f50f26
* ext/dbm/extconf.rb: check DBM_SUFFIX for Mac OS X.
...
Its ndbm.h doesn't include db.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-21 21:13:52 +00:00
akr
eac1d9cfca
* ext/dbm/dbm.c (fdbm_initialize): disable Berkeley DB error messages.
...
* ext/dbm/extconf.rb: check DBC type for above.
[ruby-dev:45269]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-21 21:04:04 +00:00
akr
a1292c72ef
update comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-20 15:00:35 +00:00
akr
faf4c9db80
* ext/dbm/extconf.rb: weaken header/library consistency check if db is
...
"ndbm". It seems several (possibly historical) distributions
provide libndbm. However the content of libndbm vary: Berkeley DB,
GDBM or even 4.3BSD NDBM. (Mandriva, Tru64 UNIX, OpenSuSE,
SCO OpenServer, ...)
"ndbm" is not searched automatically now (dblib doesn't contain it)
but configure --with-dbm-type=ndbm choose libndbm and ndbm.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-20 11:05:31 +00:00
akr
f8015c23c4
* ext/dbm/extconf.rb: refine variable names.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-20 10:16:25 +00:00
akr
d7bf156afd
* ext/dbm/extconf.rb: show header and library found.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19 14:44:24 +00:00
akr
95f3f9829f
* ext/dbm/dbm.c (Init_dbm): refine DBM::VERSION definition.
...
* ext/dbm/extconf.rb: provide RUBYDBM_GDBM_HEADER macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19 14:02:14 +00:00
akr
0187905af2
* ext/dbm/extconf.rb: detect GDBM's ndbm.h by testing dbm_clearerr is
...
an empty macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 16:06:52 +00:00
akr
fcd8f78ea3
* ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
...
is available since GDBM 1.9 because 'gdbm_compat' is appropriate
choise since GDBM 1.8.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 15:31:09 +00:00
akr
fc0111cce1
* ext/dbm/extconf.rb (dblib): prefer recent GDBM over older GDBM.
...
(have_declared_libvar): new function to check a declared variable
exists in a library.
(have_undeclared_libvar): renamed from renamed from have_libvar.
(headers.db_check2): check that GDBM version variable if GDBM header
is choosen.
* ext/dbm/dbm.c (Init_dbm): use HAVE_DECLARED_LIBVAR_GDBM_VERSION and
HAVE_UNDECLARED_LIBVAR_GDBM_VERSION macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 09:47:07 +00:00
akr
e7a1d4a309
* ext/dbm/dbm.c (DBM::VERSION): define it by detecting _GDBM_H_ or
...
_DBM_IOERR.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 03:51:52 +00:00
akr
92e7c2d3ea
* ext/dbm/extconf.rb: remove dbm.
...
forgotten in r34666.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 12:41:54 +00:00
akr
6d1f751207
* ext/dbm/extconf.rb: refine header/libraty mismatch detection.
...
check only for ndbm.h except libc. check _GDBM_H_ for gdbm.
check _DBM_IOERR for the original ndbm.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 12:29:50 +00:00
akr
fbca1d0da1
* ext/dbm/extconf.rb: don't check libdbm. It is not a ndbm
...
implementation. (libdbm in Version 7 Unix is database library
for single database per process.)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 12:10:32 +00:00
akr
2f92a267f4
* ext/dbm/extconf.rb: refactored to split too long conditions.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-16 22:32:10 +00:00
akr
078b3cf95e
* ext/dbm/extconf.rb: check _DB_H_ macro unavailable except
...
Berkeley DB library.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-16 15:05:46 +00:00
akr
f119915f51
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-11 12:05:57 +00:00
shirosaki
9678dce5a4
* ext/dbm/dbm.c (Init_dbm): fix a build error on mswin32.
...
use `extern __declspec(dllimport)` for dll link with VC.
[ruby-core:41996] [Bug #5869 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-10 13:21:54 +00:00
akr
a408b64c62
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09 05:09:57 +00:00
akr
5335b4b608
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09 04:02:08 +00:00
akr
c5fada686d
fix spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-06 10:38:28 +00:00
akr
bb1875175b
* ext/dbm/dbm.c: use db_version() instead of DB_VERSION_STRING for
...
detect runtime Berkeley DB version.
use dpversion instead of _QDBM_VERSION for detect runtime QDBM
[ruby-dev:44948]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-06 10:21:12 +00:00
akr
2f49f5ee0b
* ext/dbm/extconf.rb: detect gdbm_version in libgdbm.
...
* ext/dbm/dbm.c: make DBM::VERSION more informative for gdbm, qdbm and
Berkeley DB 1.x. [ruby-dev:44944]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-06 03:38:07 +00:00
akr
09d2180d2d
* ext/dbm/extconf.rb: revert a part of the patch in [ruby-dev:41531].
...
don't use db.h with other headers. [ruby-dev:44884].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 11:45:32 +00:00
akr
158a828c97
add comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 11:22:15 +00:00
nobu
416778c5d8
* ext/dbm/extconf.rb: use convertible_int.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-13 14:47:31 +00:00
akr
abe61eb0d1
update comments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-13 12:32:15 +00:00
akr
bfed16a21f
* ext/dbm/extconf.rb: rollback for each headers for each libraries.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-13 10:58:18 +00:00