path: root/doc
diff options
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-07 18:49:49 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-07 18:49:49 (GMT)
commitb401937c627f2aa15c5eb7d6810fd0c049968ecc (patch)
tree193c3ecd1a8b4db05f850e926c94b35fc67cdb9f /doc
parent8dce6b15cc9eaa12d89926570cffd7ac7634fb83 (diff)
doc/extension.rdoc: warn about kwargs performance in C [ci skip]
This existing API seems doomed performance-wise, and writing things in Ruby is nicer anyways. So discourage folks from using it. [Feature #11339] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc')
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index 00e789f..40c68e8 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -1412,6 +1412,11 @@ int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optiona
next to optional +values+ as a new Hash, otherwise raises "unknown
keyword" +ArgumentError+.
+ Be warned, handling keyword arguments in the C API is less efficient
+ than handling them in Ruby. Consider using a Ruby wrapper method
+ around a non-keyword C function.
+ ref:
VALUE rb_extract_keywords(VALUE *original_hash)
Extracts pairs whose key is a symbol into a new hash from a hash