Skip to content

Commit 8e4ffc3

Browse files
documentation
1 parent 525fcb3 commit 8e4ffc3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cogni.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,11 @@ cog_object* cog_run_well_known(cog_object*, const char*);
506506
*/
507507
cog_object* cog_run_well_known_strict(cog_object*, const char*);
508508

509+
/**
510+
* Returns true if an implementation for the specified well-known method appears to exist
511+
* for that object's type. It doesn't call anything so there's no way of knowing if the
512+
* method would return `cog_not_implemented()`.
513+
*/
509514
bool cog_has_well_known(cog_object*, const char*);
510515

511516
/**
@@ -646,14 +651,15 @@ extern cog_obj_type cog_ot_continuation;
646651

647652
/**
648653
* Ensures that an object is a list type, returning early with an error if not.
654+
* This is special-cased because NULL is considered to be a list and not anything else.
649655
*/
650656
#define COG_ENSURE_LIST(obj) \
651657
do { \
652658
if (obj) COG_ENSURE_TYPE((obj), &cog_ot_list); \
653659
} while (0)
654660

655661
/**
656-
* Ensures that an object is one of the numeric types, returning early with an error if not, and storing the float result in the variable
662+
* Ensures that an object is one of the numeric types, returning early with an error if not, and storing the float result in the variable.
657663
*/
658664
#define COG_GET_NUMBER(obj, var) \
659665
do { \

0 commit comments

Comments
 (0)