Skip to content

Commit 483ebe3

Browse files
committed
Comment *curl-options*
1 parent 6b5638c commit 483ebe3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/curl-easy.dylan

+12-2
Original file line numberDiff line numberDiff line change
@@ -589,10 +589,15 @@ define class <curl-info-error> (<curl-error>) end;
589589

590590
///////////////////////////////////////////////////////////////////////////////
591591
//
592-
// Curlerrors as exceptions
592+
// <curl> and <curl-easy> classes
593593
//
594594
///////////////////////////////////////////////////////////////////////////////
595595

596+
//
597+
// *curl-options* is a table from keywords to setter methods. Used to
598+
// initialize the class in the `make` method.
599+
//
600+
596601
define variable *curl-options*
597602
= make(<table>);
598603

@@ -607,13 +612,18 @@ end;
607612

608613
define method make
609614
(class == <curl-easy>, #rest options, #key) => (_ :: <curl-easy>)
615+
616+
// Assign slot default initialization or value passed with headers:
610617
let curl = next-method();
611618

619+
// check that slot has been initialized
612620
if (null-pointer?(curl.curl-handle))
613621
signal(make(<curl-init-error>))
614622
end;
615623

616-
// initialize options
624+
// initialize curl's options using setters.
625+
// parameter options contains pairs of keywords and values
626+
// (e.g. #"url", "http://example.com", #"verbose", #t ...)
617627
for (i from 0 below options.size - 1 by 2)
618628
let keyword = options[i];
619629
let value = options[i + 1];

0 commit comments

Comments
 (0)