Skip to content

Commit

Permalink
Fix doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
uvlad7 committed Sep 6, 2024
1 parent 4c7ae52 commit 2a2b04c
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions ext/curb_easy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3482,9 +3482,16 @@ static VALUE ruby_curl_easy_last_error(VALUE self) {

/*
* call-seq:
* easy.setopt Fixnum, value => value
* easy.setopt(opt, val) => val
*
* Initial access to libcurl curl_easy_setopt
*
* @param [Integer] opt The option to set, see +Curl::CURLOPT_*+ constants
* @param [Object] val
* @return [Object] val
* @raise [TypeError] if the option is not supported
* @note Some options - like url or cookie - aren't set directly throught +curl_easy_setopt+, but stored in the Ruby object state.
* @note When +curl_easy_setopt+ is called, return value is not cheched here.
*/
static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {
ruby_curl_easy *rbce;
Expand Down Expand Up @@ -3629,11 +3636,6 @@ static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {
curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPINTVL, NUM2LONG(val));
break;
#endif
#if HAVE_CURLOPT_COOKIELIST
case CURLOPT_COOKIELIST: {
curl_easy_setopt(rbce->curl, CURLOPT_COOKIELIST, StringValueCStr(val));
} break;
#endif
#if HAVE_CURLOPT_HAPROXYPROTOCOL
case CURLOPT_HAPROXYPROTOCOL:
curl_easy_setopt(rbce->curl, CURLOPT_HAPROXYPROTOCOL, NUM2LONG(val));
Expand All @@ -3655,6 +3657,11 @@ static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {
curl_easy_setopt(rbce->curl, CURLOPT_SSL_SESSIONID_CACHE, NUM2LONG(val));
break;
#endif
#if HAVE_CURLOPT_COOKIELIST
case CURLOPT_COOKIELIST: {
curl_easy_setopt(rbce->curl, CURLOPT_COOKIELIST, StringValueCStr(val));
} break;
#endif
#if HAVE_CURLOPT_PROXY_SSL_VERIFYHOST
case CURLOPT_PROXY_SSL_VERIFYHOST:
curl_easy_setopt(rbce->curl, CURLOPT_PROXY_SSL_VERIFYHOST, NUM2LONG(val));
Expand All @@ -3669,9 +3676,13 @@ static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {

/*
* call-seq:
* easy.getinfo Fixnum => value
* easy.getinfo(opt) => nil
*
* Iniital access to libcurl curl_easy_getinfo, remember getinfo doesn't return the same values as setopt
*
* @note This method is not implemented yet.
* @param [Fixnum] code Constant +CURLINFO_*+ from libcurl
* @return [nil]
*/
static VALUE ruby_curl_easy_get_opt(VALUE self, VALUE opt) {
return Qnil;
Expand Down

0 comments on commit 2a2b04c

Please sign in to comment.