Well, I really made a mess with the last commit; this one sorts it out.
This commit is contained in:
parent
1196b3eb1d
commit
a302663b32
16 changed files with 3671 additions and 0 deletions
36
archive/c/ops/equal.h
Normal file
36
archive/c/ops/equal.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* equal.h
|
||||
*
|
||||
* Checks for shallow and deep equality
|
||||
*
|
||||
* (c) 2017 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "consspaceobject.h"
|
||||
|
||||
#ifndef __equal_h
|
||||
#define __equal_h
|
||||
|
||||
/**
|
||||
* size of buffer for assembling strings. Likely to be useful to
|
||||
* read, too.
|
||||
*/
|
||||
#define STRING_SHIPYARD_SIZE 1024
|
||||
|
||||
/**
|
||||
* Shallow, and thus cheap, equality: true if these two objects are
|
||||
* the same object, else false.
|
||||
*/
|
||||
bool eq( struct cons_pointer a, struct cons_pointer b );
|
||||
|
||||
/**
|
||||
* Deep, and thus expensive, equality: true if these two objects have
|
||||
* identical structure, else false.
|
||||
*/
|
||||
bool equal( struct cons_pointer a, struct cons_pointer b );
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue